Skip to content

TypeScript code snippet – How to draw grids in plotly?

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

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

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

    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")
See also  Python code snippet - How to change the title bar color in tkinter?

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.