Estoy empezando a usar los cuadernos Jupyterlab de Jupyter. En los cuadernos solía usar:
import matplotlib.pyplot as plt %matplotlib notebook plt.figure() x = [1,2,3] y = [4,5,6] plt.plot(x,y)
para plots interactivas. Que ahora me da (en jupyterlab):
JavaScript output is disabled in JupyterLab
También he probado la magia (con jupyter-matplotlib instalado):
%matplotlib ipympl
Pero eso simplemente vuelve:
FigureCanvasNbAgg()
Parcelas en línea:
%matplotlib inline
Funciona bien, pero quiero plots interactivas.
Según la sugerencia de Georgy , esto se debió a que Node.js no se instaló.
Para habilitar el backend jupyter-matplotlib, use la magia matupplotlib Jupyter:
%matplotlib widget import matplotlib.pyplot as plt plt.figure() x = [1,2,3] y = [4,5,6] plt.plot(x,y)
Más información aquí jupyter-matplotlib en GitHub