yes. i think a fix for this was submitted recently and will be in the next release.
will take a look in the morning.
On 4/26/16 10:52 PM, nov...@gmail.com wrote:
It also appears that Bar modifies the DataFrame inplace though that doesn't appear to be the cause of my problems...
-Dave
On Wednesday, 27 April 2016 13:42:30 UTC+10, nov...@gmail.com wrote:
Thanks for the quick reply, but that doesn't seem to make a difference.
For ease of reproducing, my failed attempts are available at Notebook :: Anaconda.org
Thanks,
Dave
On Wednesday, 27 April 2016 13:15:05 UTC+10, Sarah Bird wrote:
I'm not sure, as I'm on my phone.
But I'd suggest trying reset_index to get your index as a column and then asking for that to be your label.
The charts api manipulates your dataframe to get all the bits it needs for your columns and it maybe that index points at the wrong thing.
Sarah Bird
sb...@continuum.io
On Apr 26, 2016, at 7:36 PM, nov...@gmail.com wrote:
My closest attempt was:
fig = Bar(
df,
label='index',
values=blend(*['A', 'B', 'C'], labels_name='categories'),
stack=cat(columns='categories', sort=False),
width=900, height=600,
)
plt.show(fig)
...but this plots 14 values on the x-axis (and I have no idea why?!)
On Wednesday, 27 April 2016 12:21:28 UTC+10, nov...@gmail.com wrote:
I think the matplotlib api may be too ingrained in me as I can't figure out how to use bokeh to create a simple bar graph.
I'm probably just having a brain-freeze but I've referred to the examples and tried multiple things with no luck so would greatly appreciate it if someone please show me how to use the bokeh api to replicate the below plot?
On the plus side it will probably be a useful example for others used to the pandas/matplotlib api.
index = pd.Index([1,2,3,4,5], label='period')
columns = pd.Index(['A', 'B', 'C'], label='categories')
values = randint(10, 100, 15).reshape(5, 3)
values.sort(axis=0)
df = pd.DataFrame(values, index, columns)
df.plot.bar(stacked=True)
i.e. the index of the DataFrame contains the x-axis labels, the columns are the categories to stack and the values are the values for each label/category
TIA,
Dave
--
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, send an email to bokeh+un...@continuum.io.
To post to this group, send email to bo...@continuum.io.
To view this discussion on the web visit https://groups.google.com/a/continuum.io/d/msgid/bokeh/1942a4e9-7f8e-488f-a51e-d2b9f2274070%40continuum.io\.
For more options, visit https://groups.google.com/a/continuum.io/d/optout\.
--
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, send an email to bokeh+un...@continuum.io.
To post to this group, send email to bo...@continuum.io.
To view this discussion on the web visit https://groups.google.com/a/continuum.io/d/msgid/bokeh/c4725c33-4f3b-410f-bef8-f67d805eee93%40continuum.io\.
For more options, visit https://groups.google.com/a/continuum.io/d/optout\.