-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Support for hierarchical labeling of bar-plots #1257
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
Comments
Could you maybe draw a quick and dirty prototype of how you think this should look? |
@dmcdougall, Sure thing! Below is the best solution I've come across so far, and it was generated with the plotting functions in Pandas. My understanding is that matplotlib subtends the plotting functionality of Pandas, but that Pandas has a few extra functions that make it easier to plot DataFrames and such. (I could be wrong about this). In any case, this is more or less what I was shooting for, although it could be prettier: It would be nice if we could do something like this: Does this make things clear? |
Yes, that makes things clearer, at least to me. One possible way to go about this is to interpret a dictionary of data to |
With the increasing popularity of the Pandas data-analysis library, more and more users can be expected to want to plot hierarchically organized data.
Below is an example of a Pandas dataframe:
(Note that the above
mean
column values are not zero, but very small floats)And here is the resulting matplotlib.pyplot bar graph:

It would be nice, and I imagine relatively simple, to add support for hierarchical labeling of the x-axis. For clarity, I mean that I should be able to create a tree-like structure of labels that shows how the left half of the bars belong to the
ASub
group, the left half of which belongs to theLD
group of theLocal
parameter, etc...Thoughts?
The text was updated successfully, but these errors were encountered: