# Subplot annotations

**URL:** <https://community.plotly.com/t/subplot-annotations/41101>\
**Category:** 📊 Plotly Python\
**Created:** [June 16, 2020, 10:24am UTC](https://community.plotly.com/t/subplot-annotations/41101 "2020-06-16T10:24:53Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![johnk](https://avatars.discourse-cdn.com/v4/letter/j/59ef9b/32.png) [@johnk](https://community.plotly.com/u/johnk)\
**Post date:** [June 16, 2020, 10:24am UTC](https://community.plotly.com/t/subplot-annotations/41101/1 "2020-06-16T10:24:53Z")

</div>

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!

---

<div class="post-metadata">

**Author:** ![empet](https://avatars.discourse-cdn.com/v4/letter/e/977dab/32.png) [@empet](https://community.plotly.com/u/empet)\
**Post date:** [June 16, 2020, 7:13pm UTC](https://community.plotly.com/t/subplot-annotations/41101/2 "2020-06-16T19:13:05Z")

</div>

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.
