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?
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!
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.