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

Add sort_columns parameter to plot to allow unsorted plots #918

Merged
merged 1 commit into from
Mar 15, 2012

Conversation

danbirken
Copy link
Contributor

I was using pandas for the first time and when plot()ing I noticed it was sorting the columns alphanumerically.

I felt like the ordering I had defined in the DataFrame was a pretty decent proxy for how I wanted the subplots to be ordered, so I think this should be an option so I can over-ride the sorting and have the plot go in the direction specified.

@adamklein
Copy link
Contributor

Looks good to me, but as it touches the API I'll let Wes have a look. Thanks for the pull req

@wesm
Copy link
Member

wesm commented Mar 15, 2012

Looks good to me

wesm added a commit that referenced this pull request Mar 15, 2012
Add sort_columns parameter to plot to allow unsorted plots
@wesm wesm merged commit 40d940b into pandas-dev:master Mar 15, 2012
@danbirken
Copy link
Contributor Author

Awesome!

Also I didn't want to push my luck too much, but is there a reason that the default is sorting columns in a plot? It certainly is a nice feature to have and I imagine for a lot of datasets it is a really helpful feature, but as a first time user it was strange to me that my plots were showing up in a different order than they were in my dataframe, especially given how wonderfully easy it is to re-order and take subsets of a dataframe.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants