Plotly Scatterpolar x-ticks rotation

Viewed 192

The following code:

import numpy as np
import plotly.graph_objects as go
  
fig = go.Figure()

y1, y2 = np.array([1, 2, 3]), np.array([1.2, 1.98, 3.1])
y = [y1, y2]

names = ['AAAAA', 'BBBBB', 'CCCCC']
marker = ['circle', 'square']
color = ['#ff0000', 'darkolivegreen']

for i,ri in enumerate(y):
    fig.add_trace(
                go.Scatterpolar(
                                r= ri,
                                theta=names,
                                name="y{}".format(i),
                                showlegend=True,
                                marker=dict(size=12, color=color[i], symbol=marker[i])
                                )
                )

fig.update_layout(
    polar=dict(
        radialaxis=dict(
                        visible=True,
                        range=[0, 5]
                    )
            ),

    title="Title"
)

fig.show()

delivers the following fig:

enter image description here

I would like to be able to manipulate the ticks AAAAA, BBBBB and CCCCC to be rotated like in:

enter image description here

0 Answers
Related