@JayR7 ,
Calling
help(go.layout.Polar.barmode)
Determines how bars at the same location coordinate are
displayed on the graph. With "stack", the bars are stacked on
top of one another With "overlay", the bars are plotted over
one another, you might need to reduce "opacity" to see multiple
bars.
The 'barmode' property is an enumeration that may be specified as:
- One of the following enumeration values:
['stack', 'overlay']
we are noticing that it doesnβt display barmode="group"
, similar to cartesian case.
But I deduced an algorithm to plot grouped polar bars, according to the number of categories/groups and the bar numbers in each group:
import plotly.graph_objects as go
categories=10
nbar_group=5 #number of bars in a group
step = 360/categories
small_step=step/(nbar_group+1)
theta = [0.5*(2*k-1)*step+small_step*(j+1) for k in range(categories) for j in range(nbar_group)]
r = [12, 10, 7, 5, 2]*categories
tickvals=[k*step for k in range(categories)]
ticktext=["C", "B", "A", "J", "I", "H", "G", "F", "E", "D"]
fig=go.Figure(go.Barpolar(r=r, theta=theta, marker_color=r, marker_colorscale="Blues",
marker_colorbar_thickness=23))
fig.update_layout(width=500, polar=dict(angularaxis=dict(tickvals=tickvals, ticktext=ticktext)))