Dear @jmmease i used exactly the same code for another data. In some range it gives right but sometimes it does not plot it correctly
import numpy as np
import pandas as pd
import telebot
import plotly.graph_objs as go
import plotly.io as pio
import datetime as dy
from plotly.offline import init_notebook_mode, iplot
init_notebook_mode()
df = pd.DataFrame({โxโ: list2, โyโ: list1})
theshhold = 1.0
fig = go.Figure()
Full line
fig.add_scattergl(x=xs, y=df.y, line={โcolorโ: โblackโ})
Above threshhgold
fig.add_scattergl(x=xs, y=df.y.where(df.y >= 50), line={โcolorโ: โredโ})
fig.add_scattergl(x = xs, y = df.y.where(df.y <= 35), line ={โcolorโ : โgreenโ})
iplot(fig)