ValueError: Invalid property specified for object of type plotly.graph_objs.scatter.Marker: 'angle'

Hello

Can someone please help me with this?
I have an issue when trying to plot markers which have an angle.
df1 = pd.DataFrame({โ€˜xโ€™:[x1],โ€˜yโ€™:[y1]})

fig2_linM_2add = px.scatter(df1, x='x', y='y')
fig2_linM_2add.update_traces(marker=dict(size=12,
                                         symbol="line-ew",
                                         angle=(BH_all1.loc[i,'azi']-90),
                                         line=dict(width=0.6,
                                                   color="DarkSlateGrey")),
                             selector=dict(mode="markers"),
                             showlegend=False,
                             hovertemplate=None, hoverinfo='none')

It works fine on one of my Windows computers when I run the code in Jupyter Notebook 6.5.2.
However, with version 6.4.8 or 6.5.4 there is the following error message.
Does anyone have experience with this? Many thanks for your help.
I use Plotly 5.15.0 on both computers.

This is the corresponding section in the docs:

Martin


ValueError Traceback (most recent call last)
~\AppData\Local\Temp\ipykernel_12392\843295384.py in
784 โ€˜yโ€™:[y1]})
785 fig2_linM = px.scatter(df1, x=โ€˜xโ€™, y=โ€˜yโ€™)
โ†’ 786 fig2_linM.update_traces(marker=dict(size=12,
787 symbol=โ€œline-ewโ€,
788 angle=(BH_all1.loc[0,โ€˜aziโ€™]-90),

โ€ฆ

ValueError: Invalid property specified for object of type plotly.graph_objs.scatter.Marker: โ€˜angleโ€™

Did you mean โ€œlineโ€?

Valid properties:
    autocolorscale

โ€ฆ

Hi, which plotly version are you using? Did you try updating to the latest one?

Hello
Thanks for your answer - itโ€™s 5.6 but now I am just about to updateโ€ฆ :slight_smile:
Letโ€™s seeโ€ฆ

Hello again

I just updated to Plotly 5.15.0 but I am still getting the same error.
This is the version where it works on the other computer.
This is strangeโ€ฆ

Plotly does somehow not understand the โ€˜angleโ€™ argument.

I am a bit helpless here because I would like to show the widget in a presentation.
What could be the issue?

Hi AIMPED

You pointed me in the right direction.
I now works with 5.15.0. However, restarting the kernel did not suffice to make it work.
I had to restart Anaconda. :smiley:
Thank you very much for your help!

1 Like