欢迎来到 AI 中文社区(简称 AI 中文社),这里是学习交流 AI 人工智能技术的中文社区。 为了更好的体验,本站推荐使用 Chrome 浏览器。
全部教程·
Python语言·
Jupyter
[目录]
·
Jupyter 绘图
Jupyter 教程
IPython 安装
IPython 启动
IPython 运行脚本
IPython 历史命令
IPython 系统命令
IPython 命令行选项
IPython 动态对象自省
IPython IO缓存
IPython 环境变量
IPython shell代码
IPython 嵌入
IPython 魔术命令
Jupyter 项目
Jupyter 笔记本
Jupyter 在线使用
Jupyter 安装与入门
Jupyter 仪表盘
Jupyter 用户界面
Jupyter 单元格类型
Jupyter 编辑
Jupyter Markdown
Jupyter 魔术功能
Jupyter 绘图
Jupyter 转换
Jupyter IPyWidgets
Jupyter QtConsole入门
QtConsole 多行编辑
QtConsole 嵌入式图形
QtConsole 保存为HTML
QtConsole 多个控制台
Jupyter 笔记本连接
Jupyter 笔记本共享
JupyterLab 概述
JupyterLab 安装和入门
JupyterLab 界面
JupyterLab 安装R内核
Jupyter 教程
IPython 安装
IPython 启动
IPython 运行脚本
IPython 历史命令
IPython 系统命令
IPython 命令行选项
IPython 动态对象自省
IPython IO缓存
IPython 环境变量
IPython shell代码
IPython 嵌入
IPython 魔术命令
Jupyter 项目
Jupyter 笔记本
Jupyter 在线使用
Jupyter 安装与入门
Jupyter 仪表盘
Jupyter 用户界面
Jupyter 单元格类型
Jupyter 编辑
Jupyter Markdown
Jupyter 魔术功能
Jupyter 绘图
Jupyter 转换
Jupyter IPyWidgets
Jupyter QtConsole入门
QtConsole 多行编辑
QtConsole 嵌入式图形
QtConsole 保存为HTML
QtConsole 多个控制台
Jupyter 笔记本连接
Jupyter 笔记本共享
JupyterLab 概述
JupyterLab 安装和入门
JupyterLab 界面
JupyterLab 安装R内核
Jupyter 绘图
Jupyter笔记本的IPython内核能够在输入单元格中显示代码图。它可以与 matplotlib 库无缝协作。带有 %matplotlib 魔术函数的内联选项即使未调用plot对象的 show()函数,也将绘制出绘图单元格。 show()函数使该图形显示在in []单元格的下面,而没有out []和数字。

现在,在末尾添加 plt.show()并再次运行单元以查看差异。
请注意,%matplotlib笔记本魔术会呈现交互式情节。
在图的下方,您可以找到一个工具栏,用于切换视图,平移,缩放和下载选项。

重要的是,如果您修改绘图下的数据,则显示内容会动态更改,而无需绘制其他绘图。
在上面的示例中,更改下面单元格中的x和y数据集,然后再次绘制图形,上面的图形将动态刷新。

下一章:Jupyter 转换
Jupyter笔记本文件的扩展名为 .ipynb 。笔记本由笔记本应用在网络浏览器中呈现。通过在文件菜单中使用下载作为选项,可以将其导出为各种文件格式。 Jupyter还具有 nbconvert 选项形 ...
AI 中文社