You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It changes the x-axis order, but it draws the line in the original order: from feb to mar to jan to apr
Should I call the px.line in another way when I want to use that argument? Because the current behaviour seems incorrect.
I can work around it by first sorting my DataFrame and then plotting, but it would be more convenient if the category_orders argument could be able to take care of it.
The current behaviour is as designed: lines connect points in the order they are given in the input data frame, and the category_orders controls the axis order only, independent of the data frame order.
I am trying to plot a pandas DataFrame with a column that contains the month as a string:
If I just feed this to
px.line
the x-axis is in alphabetical order (feb, mar, jan, apr):Luckily px.line has a
category_orders
argument:It changes the x-axis order, but it draws the line in the original order: from feb to mar to jan to apr
Should I call the px.line in another way when I want to use that argument? Because the current behaviour seems incorrect.
I can work around it by first sorting my DataFrame and then plotting, but it would be more convenient if the
category_orders
argument could be able to take care of it.I founde #3645, but that seems to be in combination with the
facet_col
argument. I am experiencing this issue with a "plain" line.Version of plotly is 5.10.0.
The text was updated successfully, but these errors were encountered: