Papermill: plot not rendering

Created on 4 Apr 2020  路  2Comments  路  Source: nteract/papermill

Trying to render a chart but I don't see a chart in my output

My notebook looks like this

from bokeh.plotting import figure,show
from bokeh.io import output_notebook
output_notebook(hide_banner=true)
p=figure()
p.circle([1],[2],size=size,color="red")
show(p)

Execution

import papermill as pm
pm.execute_notebook("test.ipynb","rendered.ipynb",parameters=dict(size=20))

Is there something else I should be doing?

Most helpful comment

Sorry for the delayed response. So the issue is that the notebook is outputting javascript in the plot and for security reasons the classic notebook does not render javascript imported from external sources. To get around this go to File -> Trust Notebook and then the plot will appear.

All 2 comments

Sorry for the delayed response. So the issue is that the notebook is outputting javascript in the plot and for security reasons the classic notebook does not render javascript imported from external sources. To get around this go to File -> Trust Notebook and then the plot will appear.

Hi all! I'm using papermill to run a notebook from command line (Ubuntu 18.04) and I'm having the same behavior. As I'm working with plotly to get some charts, I've tried:

from plotly.offline import init_notebook_mode
init_notebook_mode()

and also:

import plotly.io as pio
pio.renderers.default='notebook'

But the only way the render the plots when the notebook is executed is by going to Trust Notebook.

Many thanks for the library, is a great resource!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

eapetitfils picture eapetitfils  路  7Comments

MSeal picture MSeal  路  7Comments

omar-masmoudi picture omar-masmoudi  路  4Comments

MSeal picture MSeal  路  3Comments

bnaul picture bnaul  路  7Comments