Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

categorical axis sorts its keys #9312

Closed
anntzer opened this issue Oct 8, 2017 · 1 comment

Comments

2 participants
@anntzer
Copy link
Contributor

commented Oct 8, 2017

Bug report

Bug summary

Categorical (i.e. string) xdata inputs get sorted before plotting.

Code for reproduction

plt.bar(["b", "a", "c"], [2, 1, 3])

Actual outcome

Bars appear in the order "a", "b", "c".

Expected outcome

Bars appear in the order of the input, so "b", "a", "c".

Matplotlib version

  • Operating system: Arch Linux
  • Matplotlib version: 2.1
  • Matplotlib backend (print(matplotlib.get_backend())): qt5agg
  • Python version: 3.6
  • Jupyter version (if applicable):
  • Other libraries:
@story645

This comment has been minimized.

Copy link
Member

commented Feb 12, 2018

closed by #9783 though the jpl implementation of strconvertor has me thinking we should support sorted and unsorted by stashing the info in the plot kwarg arg and as an attribute on unitdata.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.