如何全屏显示图 [英] How to display a plot in fullscreen
本文介绍了如何全屏显示图的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在尝试以全屏方式显示情节.这是我的代码:
i am trying to display a plot but in fullscreen. This is my code :
import numpy as np
import pylab as plt
a = np.array([1,2,3,4])
b = np.array([1,2,3,4])
plt.plot(a,b,'.')
plt.show()
但是问题是:这不会以全屏显示.有什么办法解决这个问题吗?谢谢.
But the problem is : this does not display with the fullscreen. Any ideas to solve this ? Thank you.
推荐答案
这取决于您的matplotlib后端. 对于Qt,您可以编写以下代码以最大化您的绘图窗口:
It is depend on your matplotlib backend. For Qt you may write this codeto maximize your plotting window:
manager = plt.get_current_fig_manager()
manager.window.showMaximized()
并阅读以下问题:将Matplotlib图形保存为全屏图像
这篇关于如何全屏显示图的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文