I have attached a jupyter notebook showing the example - but is it possible to plot a hierarchical axis similar to the link I have attached in the notebook? Currently what I have done is pop the index out and make it into columns in the dataframe.
I have attached a jupyter notebook showing the example - but is it possible to plot a hierarchical axis similar to the link I have attached in the notebook? Currently what I have done is pop the index out and make it into columns in the dataframe.
then .reset_index() to pull the index out into columns.
On Tue, May 24, 2016 at 4:44 PM jared < >
wrote:
I have attached a jupyter notebook showing the
example - but is it possible to plot a hierarchical axis
similar to the link I have attached in the notebook?
Currently what I have done is pop the index out and make it
into columns in the dataframe.
–
You received this message because you are subscribed to the Google
Groups “Bokeh Discussion - Public” group.
To unsubscribe from this group and stop receiving emails from it,
To post to this group, send email to [email protected].
To view this discussion on the web visit [](https://groups.google.com/a/continuum.io/d/msgid/bokeh/CADss3AQst5kQ6X3QDExbvHFy%3Drtbc--591_Po%2B%3DO0f%3DDkByCCQ%40mail.gmail.com?utm_medium=email&utm_source=footer) .
Yes, a pre-requisite to doing this "for real" is to rework the "categorical coordinates" notion, and to properly support nested or hierarchical coordinate systems. I thought there was already an issue for this, but I can't find one, so I'd agree that a feature request is appropriate. This will be a fairly large chunk of new work, which probably won't be able to happen until later this year. For the time being I'm afraid the "manual twin-axis approach" is your best bet.
Thanks,
Bryan
···
On May 25, 2016, at 10:47 AM, Sarah Bird - Continuum <[email protected]> wrote:
Apologies in advance if I've misunderstood somthing.
I don't believe that the pre-baked charts support multi-level labels, although that is something you can achieve with bokeh a little more manually: Bokeh Docs
I think that would be a nice feature, although it does sound like a tricky one. Maybe you can add a feature request on github?
On 5/24/16 1:58 PM, jared wrote:
I suppose I have a few questions here:
1.
As written before, can one make a multi-level index look like: Infragistics Forums
2.
In the example I attached in the previous example, I tried:
p_base = Bar(final_output, values='nps', label=['work_location', 'month'])
show(p_base)
But the "values" argument has only some fixed values.
when using pandas I can aggregate by using a customer agg function such as:
df_base.groupby(['work_location', 'month']).agg({'nps': nps})
(as seen in the example.)
Is it possible to pass a custom aggregation function. I have tried several ways and don't seem to be able to.
I was just trying to Directly plot with Bar without having to first do this:
df_base.groupby(['work_location', 'month']).agg({'nps': nps})
then .reset_index() to pull the index out into columns.
On Tue, May 24, 2016 at 4:44 PM jared <[email protected]> wrote:
I have attached a jupyter notebook showing the example - but is it possible to plot a hierarchical axis similar to the link I have attached in the notebook? Currently what I have done is pop the index out and make it into columns in the dataframe.