如何在 python 中自动最大化 pylab 绘图窗口?
在 python 中(在 Ubuntu Linux 下),我使用 pylab 来绘图。
当我调用时:
pylab.savefig(filename)
它以当前屏幕分辨率保存图形。如果我有很多子图,看起来会很糟糕,所以我通常必须在调用“savefig”之前手动最大化窗口。
示例:
-- 不最大化窗口
-- 窗口最大化
有没有办法自动最大化 pylab 窗口?
(我看到有人发布了使用 win32gui 的 Windows 解决方案,但我使用的是 Linux)
谢谢!
In python (under Ubuntu Linux), I'm using pylab to make plots.
When I call:
pylab.savefig(filename)
It saves the figure at the current screen resolution. The looks terrible if I have lots of subplots, so I usually have to manually maximize the window before I call 'savefig'.
Examples:
-- Without maximizing the window
Is there some way to automatically maximize a pylab window?
(I saw someone had posted a solution for Windows using win32gui, but I'm in Linux)
Thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
更多
发布评论
评论(1)
您可以通过以下方式更改分辨率:
You can change resolution this way: