2020-07-16
阅读量:
1568
在Jupyter notebook中插入图片的四种方法
第一种

Markdown格式下
路径是相对路径,不能是绝对路径。
不能改变图形大小
第二种
from IPython.display import Image Image(filename = 'G:/workspace/test/python.jpg', width=100, height=60)
第三种
%%html<img src='python.jpg', width=100, height=60>
路径是相对路径,不能是绝对路径。
可改变图形大小。
第四种
网络图片

2.本地图片(与jupyter文件在同一目录)

3. 前面有”!”符号,无论windows还是linux图片路径都是右斜杠“/”
4. 方法3对应的是code模式,图片可以居中
5. 调整图片百分比的方法:
<img src="python.jpg" width="40%">






评论(0)


暂无数据