On Mar 22, 2015, at 11:12 PM, Greg Thompson Jr. <spockthompsonjr@gmail.com> wrote:
This does not work. Is your example supposed to display anything?
On Sunday, March 22, 2015 at 10:20:39 PM UTC-4, Bryan Van de ven wrote:
To be fair, Twitter is not exactly conducive to technical discussions. Here is a simple Pie chart using wedge, which takes a center point and radius as parameters, together with a list of start and end angles (currently in radians) for each wedge you want.
from bokeh.plotting import *
from numpy import pi
# define starts/ends for wedges from percentages of a circle
percents = [0, 0.3, 0.4, 0.6, 0.9, 1]
starts = [p*2*pi for p in percents[:-1]]
ends = [p*2*pi for p in percents[1:]]
# a color for each pie piece
colors = ["red", "green", "blue", "orange", "yellow"]
# create a figure and add a wedge glyph to it
p = figure()
p.wedge(x=0, y=0, radius=1, start_angle=starts, end_angle=ends, color=colors)
# display/save everythin
output_file("pie.html")
show(p)
If you get a chance, please update the SO question.
Thanks,
Bryan
> On Mar 22, 2015, at 8:48 PM, Greg Thompson Jr. <spockth...@gmail.com> wrote:
>
> I'd like to construct a pie chart. Currently, the documentation covers donut charts. Visually, those appear to be the closest to what I'm looking for, but I don't know how I'd go about leveraging the `Donut` class to construct a pie chart. I was told by someone running the Bokeh Twitter page to check out wedges. That wasn't very helpful.
>
> Is there any working example of a pie chart? Ultimately, I will want to embed the chart in a webpage.
>
> I've also asked on StackOverflow: python - How do I create a pie chart using Bokeh? - Stack Overflow
>
> Thanks.
>
> --
> 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/f844ae2b-2b12-4d10-ae39-3aac379e7474%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+unsubscribe@continuum.io.
To post to this group, send email to bokeh@continuum.io.
To view this discussion on the web visit https://groups.google.com/a/continuum.io/d/msgid/bokeh/e8b76a18-a658-470e-8211-8f1286d29bb8%40continuum.io\.
For more options, visit https://groups.google.com/a/continuum.io/d/optout\.