How to display large image from IPython notebook with scrolling?

拟墨画扇 提交于 2020-01-03 03:19:08

问题


How can I display a large image with scrollbars inside an IPython notebook output cell? The example below scales down the image to fit into the cell, and width does not have any effect.

from IPython.core.display import Image, display display(Image('https://i.ytimg.com/vi/j22DmsZEv30/maxresdefault.jpg', width=1900))


回答1:


Use unconfined=True to disable max-width confinement of the image:

from IPython.core.display import Image, display display(Image('https://i.ytimg.com/vi/j22DmsZEv30/maxresdefault.jpg', width=1900, unconfined=True))



来源:https://stackoverflow.com/questions/36766082/how-to-display-large-image-from-ipython-notebook-with-scrolling

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!