2021-12-04

Plotly time series multiplots

I need help with plotly - plotting time series interactive charts with multiple lines in each subplot. My data looks like this:

import pandas as pd
df1 = pd.DataFrame(np.random.randint(100, size=(100,6)), columns=['A_red', 'A_blue', 'B_red', 'B_blue', 'C_red', 'C_blue'])

Next I want to do:

import plotly.express as px
fig1 = px.line(df, y=['A_red', 'A_blue'], color=['red', 'blue'])
fig2 = px.line(df, y=['B_red', 'B_blue'], color=['red', 'blue'])
fig3 = px.line(df, y=['C_red', 'C_blue'], color=['red', 'blue'])

figs = [fig1, fig2, fig3]
figs.show()

I cant get any plot to load in spyder (inline or in the plots tab), also how do I map colors to different lines?

Thanks



from Recent Questions - Stack Overflow https://ift.tt/3ErcJ6U
https://ift.tt/eA8V8J

No comments:

Post a Comment