# add first scatter trace at row = 1, col = 1įig.add_trace(go.Scatter(x=df, y=df, line=dict(color='red'), name='B'), # add first bar trace at row = 1, col = 1įig.add_trace(go.Bar(x=df, y=df, ![]() ![]() And if you make sure to tweak a few other parameters as well like the zeroline and layer='below' you'll get a result thats pretty good:įrom plotly.subplots import make_subplots At the moment you cannot change theīUT you are free to place shapes anywhere you'd like on both subplots by referencing both x axes through xref=x and xref=x2 in fig.update_layout(shapes=dict()). ![]() The background color is set in layout for the figure: Unfortunately, it still does not seem that you can set different background colors for the different subplots directly:
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |