# How to position arrows between markers of variable size

**URL:** <https://community.plotly.com/t/how-to-position-arrows-between-markers-of-variable-size/4419>\
**Category:** 📊 Plotly Python\
**Created:** [June 5, 2017, 9:54am UTC](https://community.plotly.com/t/how-to-position-arrows-between-markers-of-variable-size/4419 "2017-06-05T09:54:46Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![nrcjea001](https://avatars.discourse-cdn.com/v4/letter/n/f07891/32.png) [@nrcjea001](https://community.plotly.com/u/nrcjea001)\
**Post date:** [June 5, 2017, 9:54am UTC](https://community.plotly.com/t/how-to-position-arrows-between-markers-of-variable-size/4419/1 "2017-06-05T09:54:46Z")

</div>

Hi.

I’m trying to create a scatter plot with arrows joining the markers. I’m having trouble positioning the tail of the arrow at the edge of the marker. Here is the code I have thus far:

```
import plotly.plotly as py
import plotly.graph_objs as go

trace1 = go.Scatter(
x=[5, 1, 2, 4],
y=[9, 15, 8, 11],
text=['...'],
mode='markers',
name = '2016',
marker=dict(size=[125, 50, 110, 75]))

trace2 = go.Scatter(
x=[3, 1, 3, 2],
y=[4, 12, 19, 10],
text=['...'],
mode='markers',
name = '2017',
marker=dict(size=[80, 40, 150, 120]))

layout = go.Layout(
showlegend=True,
annotations=[
    dict(
        ax=5,
        ay=9,
        axref='x',
        ayref='y',
        showarrow=True,
        arrowhead=2,
        arrowsize=1,
        arrowwidth=2,
        arrowcolor='#636363',
        x=3,
        y=4,
        xref='x',
        yref='y',
        standoff = 80/2
    ),
    dict(
        ax=1,
        ay=15,
        xref='x',
        yref='y',
        showarrow=True,
        arrowhead=2,
        arrowsize=1,
        arrowwidth=2,
        arrowcolor='#636363',
        axref='x',
        ayref='y',
        standoff = 40/2,
        x=1,
        y=12
    ),
    dict(
        ax=2,
        ay=8,
        xref='x',
        yref='y',
        showarrow=True,
        arrowhead=2,
        arrowsize=1,
        arrowwidth=2,
        arrowcolor='#636363',
        axref='x',
        ayref='y',
        standoff = 150/2,
        x=3,
        y=19
    ),
    dict(
        ax=4,
        ay=11,
        xref='x',
        yref='y',
        showarrow=True,
        arrowhead=2,
        arrowsize=1,
        arrowwidth=2,
        arrowcolor='#636363',
        axref='x',
        ayref='y',
        standoff = 120/2,
        x=2,
        y=10
    )
])

data = [trace1, trace2]
fig = go.Figure(data=data, layout=layout)
py.iplot(fig, filename='bubblechart-arrow')

```

Thanks ahead
