向jupyter notebook插入图片并控制大小和对齐方式
控制 方式 图片 大小 插入 对齐 Jupyter Notebook
2023-09-11 14:21:25 时间
1. 插入网络图片的同时设置显示大小并进行对齐
将cell
模式改为markdown
,然后插入如下内容,并按shift+enter
显示(请自行替换图片地址)
<img src="https://www.domain.com/image_file_name.jpg" alt="ImageFile" style="width: 500px;" align="left"/>
实例:
2. 插入本地图片的同时设置显示大小并进行对齐
将cell
模式改为markdown
,然后插入如下内容,并按shift+enter
显示(请自行替换图片文件路径和文件名)
<img src="cube2.png" alt="Drawing" style="width: 200px;" align="left"/>
实例:
3.直接显示
本方法不支持调整图片大小和位置,默认居中100%显示。
将cell
模式改为markdown
,然后向cell
内拖入图片或者通过Edit - Insert Image
菜单插入。
以上方法在2022年4月7日测试成功于如下环境:
Server Information:
You are using Jupyter notebook.
The version of the notebook server is: 6.4.10
The server is running on this version of Python:
Python 3.8.10 (default, Mar 15 2022, 12:22:08)
[GCC 9.4.0]
Current Kernel Information:
Python 3.8.10 (default, Mar 15 2022, 12:22:08)
Type ‘copyright’, ‘credits’ or ‘license’ for more information
IPython 8.2.0 – An enhanced Interactive Python. Type ‘?’ for help.
相关文章
- Swift控制语句
- Kubernetes 灰度/滚动发布 滚动更新速率控制解读 maxUnavailable,maxSurge
- ASP.NET Core中的依赖注入(1):控制反转(IoC)
- Linux 任务控制(bg job fg nohup &)
- Spring的控制反转和依赖注入
- LabVIEW编程LabVIEW控制研华PCI 1220运动控制卡例程与相关资料
- ToDesk 远程桌面控制
- FIFO的控制模块
- 电赛菜鸟营培训(一)——STM32F103CB之LED控制
- asp.net core mvc权限控制:分配权限
- 谈谈分布式事务之一:SOA需要怎样的事务控制方式
- pytorch 30 torchscipt(jit模型)与onnx输入单个int数值与if分支控制
- FPGA 20个例程篇:20.USB2.0/RS232/LAN控制并行DAC输出任意频率正弦波、梯形波、三角波、方波(二)