Update each wind rose's properties in a plotly subplot


I am trying to plot multiple wind roses in a subplot using Barplot function of the plotly.graph_objects library. I have succeded to render the wind roses.

After that, I tried to customize the properties of the wind roses using fig.update_layout, but only one of them was updated properly (see figure).
fig.update_layout( title=title, title_font_size=26, title_x = 0.463, legend_font_size=18, polar_radialaxis_ticksuffix='%', polar_angularaxis_rotation=90, polar_angularaxis_direction='clockwise', polar_angularaxis_tickmode = 'array', polar_angularaxis_tickvals=[0, 45, 90, 135, 180, 225, 270, 315], polar_angularaxis_ticktext=['<b>N</b>','NE', '<b>E</b>', 'SE', '<b>S</b>', 'SW', '<b>W</b>', 'NW'], polar_angularaxis_tickfont_size = 22, polar_radialaxis_tickmode = 'linear', polar_radialaxis_angle = 45, polar_radialaxis_tick0 = 5, polar_radialaxis_dtick = 5, polar_radialaxis_tickangle = 100, polar_radialaxis_tickfont_size = 14)

Can anyone please suggest some way to achieve this ? the main properties I want to modify (polar_angularaxis_rotation polar_angularaxis_direction , polar_angularaxis_tickvals , polar_angularaxis_ticktext … )

Hello @AitAhmed,

Welcome to the community!

In order to do this, you’d have to adjust both of the subplots.

Something like this may work. :slight_smile:


Thank your for the answer !
However using fig.update_layout or fig.update_traces still didn’t get the job done. In fact, my need is very simple and specific:

  1. I want to have only one unified legend for all subplots.
  2. I want to apply same properties and appearence configuration to all subplots (by looping or all the once, doesn’t really matter … ). For example, I want direction = “clockwise”, rotation = 90, same tickvals, same ticktext and fot size …
    The best I could acheive so far was done using fig.update_layout, however It only sets up one trace (the first rose by default ) and doesn’t accept any argument relative to subplots choice (row, col, …).

I am still testing with both functions. I would appreciated any extra tips.