Skip to content

Commit c0c1632

Browse files
committed
Fix for Python "Custom Buttons" doc page
1 parent 6e924a0 commit c0c1632

File tree

1 file changed

+19
-11
lines changed

1 file changed

+19
-11
lines changed

Diff for: doc/python/custom-buttons.md

+19-11
Original file line numberDiff line numberDiff line change
@@ -392,24 +392,32 @@ fig.add_trace(
392392
line=dict(color="#F06A6A", dash="dash")))
393393

394394
# Add Annotations and Buttons
395-
high_annotations = [dict(x="2016-03-01",
395+
high_annotations = [dict(x=-0.05,
396396
y=df.High.mean(),
397-
xref="x", yref="y",
398-
text="High Average:<br> %.2f" % df.High.mean(),
399-
ax=0, ay=-40),
397+
xanchor="right",
398+
yanchor="bottom",
399+
xref="x domain",
400+
yref="y",
401+
text="High Avg:<br> %.2f" % df.High.mean(),
402+
showarrow=False),
400403
dict(x=df.High.idxmax(),
401404
y=df.High.max(),
402-
xref="x", yref="y",
405+
xref="x",
406+
yref="y",
403407
text="High Max:<br> %.2f" % df.High.max(),
404408
ax=0, ay=-40)]
405-
low_annotations = [dict(x="2015-05-01",
409+
low_annotations = [dict(x=-0.05,
406410
y=df.Low.mean(),
407-
xref="x", yref="y",
408-
text="Low Average:<br> %.2f" % df.Low.mean(),
409-
ax=-40, ay=40),
410-
dict(x=df.High.idxmin(),
411+
xanchor="right",
412+
yanchor="top",
413+
xref="x domain",
414+
yref="y",
415+
text="Low Avg:<br> %.2f" % df.Low.mean(),
416+
showarrow=False),
417+
dict(x=df.Low.idxmin(),
411418
y=df.Low.min(),
412-
xref="x", yref="y",
419+
xref="x",
420+
yref="y",
413421
text="Low Min:<br> %.2f" % df.Low.min(),
414422
ax=0, ay=40)]
415423

0 commit comments

Comments
 (0)