Reputation: 467
If I run this code on a jupyter notebook
from bqplot import pyplot as plt
import numpy as np
plt.figure(1, title='Line Chart')
np.random.seed(0)
n = 200
x = np.linspace(0.0, 10.0, n)
y = np.cumsum(np.random.randn(n))
plt.plot(x, y)
plt.show()
The plot display, but if I run the same code on Jupyter lab I get
VBox(children=(Figure(axes=[Axis(scale=LinearScale()), Axis(orientation='vertical', scale=LinearScale())], fig…
How do I fix this?
Upvotes: 0
Views: 3408
Reputation: 1994
$ pip install bqplot
$ jupyter labextension install @jupyter-widgets/jupyterlab-manager
$ jupyter labextension install bqplot
import bqplot
Then restart jupyter lab. You are ready to go!
Upvotes: 3
Reputation: 173
Hi just type this in a cell and then run it, it should work!
%matplotlib inline
Upvotes: 0