jupyterlab 交互式绘图 [英] jupyterlab interactive plot

查看:87
本文介绍了jupyterlab 交互式绘图的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在从 Jupyter notebooks 开始使用 Jupyterlab.在我以前使用的笔记本中:

I'm getting into using Jupyterlab from Jupyter notebooks. In notebooks I used to use:

import matplotlib.pyplot as plt
%matplotlib notebook
plt.figure()
x = [1,2,3]
y = [4,5,6]
plt.plot(x,y)

用于交互式绘图.现在给了我(在 jupyterlab 中):

for interactive plots. Which now gives me (in jupyterlab):

JavaScript output is disabled in JupyterLab

我也尝试了魔法(使用 jupyter-matplotlib已安装):

I have also tried the magic (with jupyter-matplotlib installed):

%matplotlib ipympl

但这只是返回:

FigureCanvasNbAgg()

内联图:

%matplotlib inline

工作正常,但我想要交互式绘图.

work just fine, but I want interactive plots.

推荐答案

根据 Georgy 的建议,这是因为没有安装 Node.js.

As per Georgy's suggestion, this was caused by Node.js not being installed.

这篇关于jupyterlab 交互式绘图的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆