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

Feature request: Categorical plotting #9069

Closed
michaelaye opened this issue Dec 13, 2014 · 5 comments
Closed

Feature request: Categorical plotting #9069

michaelaye opened this issue Dec 13, 2014 · 5 comments

Comments

@michaelaye
Copy link
Contributor

In the case of the index being a DateTimeIndex, I think there's a nice easy default case for plotting a categorical column: Let each category assume one value on the y-axis (user-providable, or range(len(categories)) by default) and plot a symbol ('*' by default maybe) at every point in time the categorical value has an entry. The y-axis tick labels should be the categorical values of course.
This can provide nice overviews in astronomy or other remote sensing sciences for example to indicate what kind of observation happened when and in what sequence. Or which of some set of lab experiments was executed when.

What do you guys think?

@jreback jreback added Categorical Categorical Data Type Visualization plotting Enhancement and removed Categorical Categorical Data Type labels Dec 13, 2014
@jreback
Copy link
Contributor

jreback commented Dec 13, 2014

can you show a (hacked) example of what you mean?

@michaelaye
Copy link
Contributor Author

So, I got through most of it, until I was stuck on how to control the ticklabels. Searching Google brought up this person's gist which basically exactly does what I asked for:

https://gist.github.com/amanahuja/0c2b6f086eed9d6c2fe0

My version is prettier (due to extra spaces for the y-axis and bigger symbols), but less general as I don't automatically determine the integers via a range over the set of categorical values:

http://nbviewer.ipython.org/gist/michaelaye/3ddb6fbc625617e6a663

@shoyer
Copy link
Member

shoyer commented Jan 21, 2015

It looks like seaborn.stripplot will handle plotting categorical data along one axis: mwaskom/seaborn#410

@jreback
Copy link
Contributor

jreback commented Jan 21, 2015

looks sexy!

@TomAugspurger
Copy link
Contributor

Going to close this in favor of more specific issues. The basics are working now (bar and scatter).

@TomAugspurger TomAugspurger added this to the No action milestone Jul 8, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants