Skip to content
Advertisement

Tag: plotly-express

How to customize plotly legend order?

I want to change the ordering of legend in my boxplot from 1-12, or perhaps even renaming them to Jan, Feb, etc. Any idea how could I do it? Answer px.box is plotting your data in the order that it’s reading through your DataFrame df, so you can pass a sorted DataFrame to px.box instead: If you want the names

Advertisement