如何通过滚动显示来自IPython笔记本的大图像? [英] How to display large image from IPython notebook with scrolling?

查看:100
本文介绍了如何通过滚动显示来自IPython笔记本的大图像?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何在IPython笔记本输出单元格中显示带有滚动条的大图像?下面的示例缩小图像以适合单元格, width 没有任何效果。

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.

<来自IPython.core.display的code>
导入图片,显示
display(图片('https://i.ytimg.com/vi/j22DmsZEv30/maxresdefault.jpg',width = 1900 ))

推荐答案

使用 unconfined = True 禁用图像的最大宽度限制:

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


来自IPython.core.display import图像,显示
显示(图片('https://i.ytimg.com/vi/j22DmsZEv30/maxresdefault.jpg',width = 1900,unconfined = True))

这篇关于如何通过滚动显示来自IPython笔记本的大图像?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆