How can we specify dashed lines vs dotted lines through plotly's go.Layout for dataframe datasets? Below is my code which uses a dataframe and spits out a plot with solid lines.
I want to use a second dataframe object to have dashed lines in the same plot.
In some sense, I am trying to compare two dataframes which have the same exact column names but they need to have different line-formats for easier comparison.
P.S. help(go.Layout) only has information on spikedlines but not on usual line formats.
Many thanks,
init_notebook_mode(connected=True)
import plotly.plotly as py
import plotly.graph_objs as go
import pandas as pd
#sample dataframe defined into `df1`
plot_df = [{
'x': df1.index,
'y': df1[col],
'name': col
} for col in df1.columns]
layout= go.Layout(
title= 'Plot_with_solidline',
xaxis= dict(title= 'Iteration'),
yaxis=dict(title= 'Accuracy'),
showlegend= True
)
fig= go.Figure(data=plot_df, layout=layout)
plot(fig, filename='pandas-line-naming-traces', auto_open=False)