I followed the “bokeh html foo.py” example in user guide, but the generated html is displayed as a blank page.
foo.py:
from bokeh.plotting import figure
p = figure()
p.line(x=[1, 2, 3], y=[4,6,2])
If I tried bokeh json foo.py, the generated json is: {“roots”:{“references”:,“root_ids”:},“title”:“Bokeh Application”,“version”:“0.12.3”} which is an empty plot.
I was wondering if I’m missing some steps, or is this behavior expected?
The example seems to be missing a couple of lines, that I would expect. Can you open a Github issue regarding this? For reference, the full code should be something like:
from bokeh.io import curdoc
from bokeh.plotting import figure
p = figure()
p.line(x=[1, 2, 3], y=[4,6,2])
curdoc().add_root(p)
IIRC we originally had some "automagic" in mind, but ultimately decided to go down a slightly more explicit route. Those docs apparently did not get updated.
I followed the "bokeh html foo.py" example in user guide, but the generated html is displayed as a blank page.
foo.py:
from bokeh.plotting import figure
p = figure()
p.line(x=[1, 2, 3], y=[4,6,2])
If I tried bokeh json foo.py, the generated json is: {"roots":{"references":,"root_ids":},"title":"Bokeh Application","version":"0.12.3"} which is an empty plot.
I was wondering if I'm missing some steps, or is this behavior expected?
Thanks Bryan! Adding those two lines make the example works. Will also open a github request.
Regards,
Verdi
···
On Friday, December 30, 2016 at 2:34:26 AM UTC+8, Bryan Van de ven wrote:
The example seems to be missing a couple of lines, that I would expect. Can you open a Github issue regarding this? For reference, the full code should be something like:
from [bokeh.io](http://bokeh.io) import curdoc
from bokeh.plotting import figure
p = figure()
p.line(x=[1, 2, 3], y=[4,6,2])
curdoc().add_root(p)
IIRC we originally had some “automagic” in mind, but ultimately decided to go down a slightly more explicit route. Those docs apparently did not get updated.
I followed the “bokeh html foo.py” example in user guide, but the generated html is displayed as a blank page.
foo.py:
from bokeh.plotting import figure
p = figure()
p.line(x=[1, 2, 3], y=[4,6,2])
If I tried bokeh json foo.py, the generated json is: {“roots”:{“references”:,“root_ids”:},“title”:“Bokeh Application”,“version”:“0.12.3”} which is an empty plot.
I was wondering if I’m missing some steps, or is this behavior expected?
Regards,
Verdi
–
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 [email protected].