Created
March 19, 2020 15:54
-
-
Save SylwiaOliwia2/2f182a5b9ded70f32b284b01b004b175 to your computer and use it in GitHub Desktop.
plotly xref="paper"
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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