# Annotation fixed alignment with arrow

**URL:** <https://community.plotly.com/t/annotation-fixed-alignment-with-arrow/17608>\
**Category:** 📊 Plotly Python\
**Created:** [January 3, 2019, 9:35pm UTC](https://community.plotly.com/t/annotation-fixed-alignment-with-arrow/17608 "2019-01-03T21:35:45Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![jmason86](https://sea2.discourse-cdn.com/flex024/user_avatar/community.plotly.com/jmason86/32/5167_2.png) [@jmason86](https://community.plotly.com/u/jmason86)\
**Post date:** [January 3, 2019, 9:35pm UTC](https://community.plotly.com/t/annotation-fixed-alignment-with-arrow/17608/1 "2019-01-03T21:35:45Z")

</div>

The normal align keyword for annotation text is only applicable to the alignment of multiline text. But what would be nice is if this keyword (or another one?) could be used to fix the position on the page and make the length of the arrow variable to accommodate. Right now it’s vice versa.

My use case:  
I have multiple annotations stacked vertically and I want an easy way to make the text in them horizontally aligned. They all have arrows pointing to different things.

---

<div class="post-metadata">

**Author:** ![jmmease](https://sea2.discourse-cdn.com/flex024/user_avatar/community.plotly.com/jmmease/32/3706_2.png) [@jmmease](https://community.plotly.com/u/jmmease)\
**Post date:** [January 3, 2019, 11:50pm UTC](https://community.plotly.com/t/annotation-fixed-alignment-with-arrow/17608/2 "2019-01-03T23:50:26Z")

</div>

Hi @jmason86,

I’m not sure if it will get you all the way to the solution you’re picturing, but have you tried the `xanchor` property? This controls where the arrow tail starts with respect the the text, and so you could use it to line up one edge of the text.

```python
import plotly.graph_objs as go
fig = go.FigureWidget({
    'data': [],
    'layout': {'annotations': [{'text': 'First One',
                                'xanchor': 'right',
                                'y': 1},
                               {'text': 'Second',
                                'xanchor': 'right',
                                'y': 2}]}
})
fig

```

 ![newplot%20(2)](https://us1.discourse-cdn.com/flex024/uploads/plot/original/2X/f/f3c57392829b8c95b19b72106a1a0c383f3fce2f.png)

-Jon
