Skip to main content
 首页 » 编程设计

python之如何在 jupyter notebook 中获得大输出窗口

2025年05月04日25birdshome

<分区>

当我们在 jupyter notebook 中有大量输出时,它会自动创建可滚动的输出窗口。有没有一种方法可以选择窗口的宽度和高度,以便所有输出图都显示在 jupyter notebook 中?

例如:

import matplotlib.pyplot as plt 
%matplotlib inline 
 
 
for i in range(10): 
    plt.plot(range(10)) 
    plt.show() 

创建一个这样的窗口:

我们可以在不滚动的情况下看到所有的图吗?

我知道自动滚动 nbextension,但想在这里获得一个大的输出窗口。

此外,对于 pandas,还有像 pd.options.display.max_rows 这样的命令。 如何为输出窗口执行此操作?