I have a VM running jupyterlab and have opened it up for external access. When jupyter-lab starts, a local browser opens up, which is fine.
Externally, I access jupyterlab and things appear to work. However, when I plot, the output doesn't show up in the browser but instead appears as a new tab in the local browser which started up with jupyter-lab.
The same thing happens if I have %matplotlib inline
.
The following is a little better in that now things display inline. However, a new tab still opens up in the other browser.
%matplotlib inline
from bokeh.plotting import figure, show, output_notebook
from bokeh.sampledata.iris import flowers
output_notebook()
colormap = {'setosa': 'red', 'versicolor': 'green', 'virginica': 'blue'}
colors = [colormap[x] for x in flowers['species']]
p = figure(title = "Iris Morphology")
p.xaxis.axis_label = 'Petal Length'
p.yaxis.axis_label = 'Petal Width'
p.circle(flowers["petal_length"], flowers["petal_width"],
color=colors, fill_alpha=0.2, size=10)
# output_file("iris.html", title="iris.py example")
show(p)