Ciaran
Ciaran

Reputation: 573

How to automatically maximize a pylab plot window in python?

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

-- With window maximized

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!

Upvotes: 2

Views: 1567

Answers (1)

lavrton
lavrton

Reputation: 20308

You can change resolution this way:

pylab.savefig('new.png', dpi = 500)

Upvotes: 1

Related Questions