Skip to content
This repository has been archived by the owner on May 15, 2018. It is now read-only.

Spaced hierarchical index #50

Closed
Maggie-M opened this issue Apr 27, 2017 · 0 comments
Closed

Spaced hierarchical index #50

Maggie-M opened this issue Apr 27, 2017 · 0 comments

Comments

@Maggie-M
Copy link
Contributor

Originally posted by afonit. For original issue and full discussion, click here.

from a discussion on the mailing list:
https://groups.google.com/a/continuum.io/forum/#!topic/bokeh/Lq5LX6yH-fU


Currently bokeh can have hierarchical indexes on plots, but they are slotted for each tick, see in this example:

import pandas as pd
import datetime
from bokeh.charts import Bar, output_notebook, show

output_notebook()

data = {
    'month': ['2016-01-01','2016-02-01', '2016-01-01'],
    'work_location': ['site_a', 'site_a', 'site_b'],
    'nps': [50.0, 33.3, -25.0]
}

df = pd.DataFrame(data)

p = Bar(df, values='nps', label=['work_location', 'month'])
show(p)

Produces the following plot:
plot_examples

On the left is the current, on the right the axis is parsed visually so it is easier/quicker to interpret and see the groups.

Here is an additional example:
http://news.infragistics.com/cfs-filesystemfile.ashx/__key/CommunityServer.Discussions.Components.Files/265/4718.Capture.PNG

Again, just floating the idea as I think it lends visual power to the graph in making the content of the axis (when it is hierarchical like this) easier to parse than the current look.

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

No branches or pull requests

1 participant