How to use Plotly express to create multiple charts in the same figure(I need 3 charts in one figure--one stacked bar chart and two lines)

Hello there,

I am trying to plot multiple charts in one graph using plotly express. I need to plot one stacked bar chart and two lines in the same figure. I have 5 columns–year,priority,value,opened and closed. I was able to plot stacked bar chart as shown in the code pasted below. Can anyone help me in plotting two more lines–one with ‘opened’ column w.r.t ‘year’ and other with ‘closed’ w.r.t ‘year’. Looking forward for your help. Thanks in advance.
Tried with add_trace() but did not work. plotly graph objects is not working in my notebook version as it is showing blank. So plotly express is my only way out now.
Code to plot stacked bar chart(Please help for drawing two more lines in the same graph):
import plotly_express as px
fig = px.bar(df, x=‘year’, y=‘value’,color=‘priority’,
hover_data=[‘priority’, ‘value’],
labels={‘value’:‘priority’}, height=400)

fig.show()

Hello Sameerass! Welcome to to forum! If I understand your question correctly I believe you are looking for the make subplots function. This function can be used to create a grid like layout of graphs! Also if you are looking to have subplots with multiple y or x axes this example should help you accomplish that!

Good luck with your project and feel free to post again if you need any more help!