'Can I make grouped bars in plotly polar bar chart?
I have a polar bar chart with stacked bars in plotly, which gives me the figure below using the code I've added as well (example found here: Wind Rode Charts):
import plotly.io as pio
pio.renderers.default = 'svg'
#pio.renderers.default = 'browser'
import pandas as pd
import plotly.express as px
import plotly.graph_objects as go
df = px.data.wind()
fig = px.bar_polar(df, r="frequency", theta="direction",
color="strength", template="ggplot2",
color_discrete_sequence= px.colors.sequential.Plasma_r)
fig.show()
fig.update_layout(legend=dict(
orientation="h",
yanchor="top",
y=-0.2,
xanchor="center",
x=0.5),
polar=dict(radialaxis=dict(showticklabels=True, ticks='', dtick=1, linewidth=0)
)
)
fig.update_polars(angularaxis_dtick=1,
angularaxis_exponentformat="power")
fig.show()
Now, I would like to group some bars together, similar to the figure below (examples python graph gallery):
I cannot figure out how to do this with plotly so I keep both the stacked bars AND the grouping. Any hint or suggestions would be highly appreciated.
Thanks!
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|


