So this is a rather novel issue because my plots are well rendered in Jupyter NOTEBOOK in offline mode, but I am unable to see them in Jupyter LAB.
Sample code :
from plotly.offline import plot, iplot, init_notebook_mode
import plotly.graph_objs as go
# Make plotly work with Jupyter notebook
init_notebook_mode()
keys=['one','two','three']
values=[1,2,3]
iplot({
"data": [go.Bar(x=keys, y=values)],
"layout": go.Layout(title="Sample Bar Chart")
})
In the console, a warning shows up :
JupyterLab does not execute inline JavaScript in HTML output
So if Jupyter Lab is blocking the execution of the scripts, maybe there is nothing to do, but now this issue is known.