Hi All.
I’m trying to annotate a point on a trace in a subplot (2, 1) which will change dynamically. This can be done for the first subplot (1, 1) easily setting x and y values to the trace values and x_ref and y_ref to “x” and “y” but there is no option to do this for any other subplots.
Assuming I’ve a shared x then for the second subplot annotation I set x_ref to “x” and control the position of y relative to the paper position, if I could get the Y value relative to the paper position?
Is there a method to either annotate the subplot or get the relative paper position from a trace point?
Cheers in advance!
Hi @johnk,
If you define a fig=make_subplots()
, let us say with 1 row and twp columns, then the subplot (1,1) is referenced to axes x and y, while the subplot (1,2) to x2, y2. Hence to add annotation to the second subplot
you should set xref='x2'
, yref='y2'
.
After the fig definition, just display fig.layout
to see the axes names.