Hi everybody.
I am trying to draw an arrow below the x_axis with the following code:
myplot = go.Figure(data=go.Scatter(x=df['time'], y=df['count'], mode='markers'))
xstart = -2
xmax = 3.5
xmin = -3.5
padding = 0.05
ypos = -0.1
mylplot.update_layout(
plot_bgcolor=colors['backgraph'],
paper_bgcolor=colors['backpaper'],
font_color=colors['text'],
showlegend=False,
width=550,
height=550,
xaxis=dict(title_text="Time", showgrid=False, showticklabels=False),
yaxis=dict(title_text="Counts", showgrid=False, showticklabels=False),
annotations=[dict(
x=xmin,
y=ypos,
ax=xstart + padding,
ay=ypos,
xref='x',
axref='x',
yref='paper',
ayref='paper',
showarrow=True,
arrowhead=2,
arrowsize=1,
arrowwidth=3,
arrowcolor='#0000ff',
)],
but I am receiving the following error:
ValueError:
Invalid value of type 'builtins.str' received for the 'ayref' property of layout.annotation
Received value: 'paper'
The 'ayref' property is an enumeration that may be specified as:
- One of the following enumeration values:
['pixel']
- A string that matches one of the following regular expressions:
['^y([2-9]|[1-9][0-9]+)?$']```
If if pass y value to ayref, the arrow is not shown. Help is appreaciated.