I have some sensor data like this one https://raw.githubusercontent.com/iulianastroia/csv_data/master/final_dataframe.csv. I have calculated the anomaly points of ch2o column using the isolation forest algorithm. I have displayed the data in a scatter plot based on anomaly or not(anomaly color code is red and normal data is blue). I have made a Scatter plot using Plotly like this:
fig_outliers = go.Figure(
data=go.Scatter(x=dates, y=df['ch2o'], mode='markers',
marker=dict(color=np.where(df['anomaly'] == 1, 'red', 'blue'))))
Now I want to contour the blue scatter points, to separate them from the red ones. How can I achieve this in Python? Something like this: