Plotly: How to output multiple line charts in single figure?
问题 I am trying to plot line chart using plotly for multiple dataframes in a single graph. My code is: import plotly.express as px labels=category_names[:10] for category in category_names[:10]: df_b=df1[df1['Country/Region']==category] fig=px.line(df_b, x="Date", y="Confirmed",labels="Country/Region") print(category) fig.show() However, by using the above code I am just able to get the line graph for last iteration of for loop. Current output: Desired Output: Kindly help me with the code! 回答1: