Answers for "how to draw two charts in one page plotly"

0

how to draw two charts in one page plotly

from plotly.subplots import make_subplots
import plotly.graph_objects as go

fig = make_subplots(rows=1, cols=2)

fig.add_trace(
    go.Scatter(x=[1, 2, 3], y=[4, 5, 6]),
    row=1, col=1
)

fig.add_trace(
    go.Scatter(x=[20, 30, 40], y=[50, 60, 70]),
    row=1, col=2
)

fig.update_layout(height=600, width=800, title_text="Side By Side Subplots")
fig.show()
Posted by: Guest on May-02-2020

Code answers related to "how to draw two charts in one page plotly"

Code answers related to "TypeScript"

Browse Popular Code Answers by Language