question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Simple script-based plotting example doesn't display within ipython 1.1.0 notebook with bokeh 0.3

See original GitHub issue

Using bokeh 0.3 with ipython 1.1.0, the initial example in the tutorial, i.e.,

from bokeh.plotting import *
output_notebook()
from numpy import *
x = linspace(-2*pi, 2*pi, 100)
y = cos(x)
output_file("cos.html")
line(x, y, color="red")
scatter(x, y, marker="square", color="blue")

returns something like

<bokeh.objects.Plot at 0x568a190>

but doesn’t display anything when run within the ipython notebook. Running the show() function will cause the plots to be displayed in a separate browser, though.

Issue Analytics

  • State:closed
  • Created 10 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
damianavilacommented, Mar 13, 2014

If you call output_notebook(), the show function has to display the plot inside the notebook. In the last release, this flow is working without any problems. BTW, since the last release (0.4.2), we had integrated a new bokeh magic with let you activate a --show mode to render the plots inline without calling the show function. For more information about the magic, check this notebook: http://nbviewer.ipython.org/github/ContinuumIO/bokeh/blob/master/extensions/BokehMagic.ipynb?create=1

0reactions
pzwangcommented, Nov 20, 2013

The output* functions are mutually exclusive in the sense that they manipulate a global “session”. There is no structural reason why there could not be two of these, but the design of the bokeh.plotting module was to simulate something akin to pylab-style plotting. In fact, the entire object graph constructed by the various plotting functions in bokeh.plotting can be stored into new session objects. In the examples/glyphs/ directory, there are examples that don’t use a session object except at the very end to actually output the plots.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Using with Jupyter — Bokeh 2.4.3 Documentation
Jupyter notebooks are computable documents often used for exploratory work, data analysis, teaching, and demonstration. A notebook is a series of input cells ......
Read more >
The Notebook | Query and analyze data - Mode Support
Open an existing report or create a new report and run one or more SQL queries from the SQL Editor. Click New Notebook....
Read more >
PyTplot's
Tplot Variables store all of the information needed to generate a plot. Parameters. • name – str Name of the tplot variable that...
Read more >
bokeh.io
Does not change the current Document from curdoc(). ... the default output state to generate output in Jupyter/IPython notebook cells when show() is...
Read more >
1 Jupyter / IPython notebook hints and tips
In [1]:. from IPython.display import display from IPython.display import Image from ... In this case the cells will simply not execute, with no...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found