How to overlay two plots in same figure in plotly ( Create Pareto chart in plotly )?

后端 未结 3 848
耶瑟儿~
耶瑟儿~ 2021-02-14 19:01

I was trying to plot barplot and scatterplot in the same plot in plotly, but it shows only scatterplot.

How to show both the plots?

data

import         


        
3条回答
  •  独厮守ぢ
    2021-02-14 19:51

    You can do something like so:

    fig = make_subplots(rows=1, cols=2)
    fig.add_trace(trace1, row=1, col=1)
    fig.add_trace(trace2, row=1, col=2)
    
    fig.update_layout(xaxis=dict(tickangle=90))
    fig.show()
    

    Which will produce the following graph:

提交回复
热议问题