plotly.py icon indicating copy to clipboard operation
plotly.py copied to clipboard

category_order is not working after using facet plots

Open YukunYangNPF opened this issue 5 years ago • 1 comments

Hi, I don't know why but the update_yaxes with category_orders as parameters is not working after using the facet_col parameters in the plotly express bar plots.

px.bar(pe_final, x='Count', y='index', 
       color='Count', color_continuous_scale=px.colors.sequential.dense,
       orientation='h',
      text=pe_final['Count'].astype('str') + '<br>'+pe_final['Perc'].astype('str')).update_yaxes(categoryorder="total ascending")

image This is when not using the facet col

px.bar(pe_final, x='Count', y='index', 
       facet_col='Type', 
       color='Count', color_continuous_scale=px.colors.sequential.dense,
       orientation='h',
      text=pe_final['Count'].astype('str') + '<br>'+pe_final['Perc'].astype('str')).update_yaxes(categoryorder="total ascending")

image This is when using the facet col, and my category orders did not work.

YukunYangNPF avatar Jan 19 '21 22:01 YukunYangNPF

Hi - we are trying to tidy up the stale issues and PRs in Plotly's public repositories so that we can focus on things that are still important to our community. Since this one has been sitting for several years, I'm going to close it; if it is still a concern, please add a comment letting us know what recent version of our software you've checked it with so that I can reopen it and add it to our backlog. Thanks for your help - @gvwilson

gvwilson avatar Jun 24 '24 16:06 gvwilson