Resize the image in jupyter notebook using markdown

后端 未结 5 2170
逝去的感伤
逝去的感伤 2020-12-07 21:37

I want to add the image in the Jupyter notebook and I want to have particular height and width. When I try to add the image using

![](img.png)

5条回答
  •  谎友^
    谎友^ (楼主)
    2020-12-07 22:18

    You can also use Image module from IPython.display

    https://ipython.org/ipython-doc/3/api/generated/IPython.display.html#IPython.display.Image

    for example

    from IPython.display import Image
    Image(url='https://www.maxpierini.it/ncov/pics/ITA.png', width=200)
    

    Use filename= instead of url= if the image is a local file.

提交回复
热议问题