Skip to content

Instantly share code, notes, and snippets.

@SylwiaOliwia2
Created March 19, 2020 15:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save SylwiaOliwia2/2f182a5b9ded70f32b284b01b004b175 to your computer and use it in GitHub Desktop.
Save SylwiaOliwia2/2f182a5b9ded70f32b284b01b004b175 to your computer and use it in GitHub Desktop.
plotly xref="paper"
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.add_annotation(
x=0.4,
y=0.4,
xref="paper",
yref="paper",
text="dict Text")
fig.add_annotation(
x=1,
y=1,
xref="paper",
yref="paper",
text="dict Text 2")
fig.update_layout(height=600, width=800, title_text="Annotations and subplots")
fig.show()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment