Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feature request: set figure sizes w.r.t. screen resolution #2958

Closed
a6073758 opened this issue Apr 8, 2014 · 1 comment
Closed

feature request: set figure sizes w.r.t. screen resolution #2958

a6073758 opened this issue Apr 8, 2014 · 1 comment

Comments

@a6073758
Copy link

a6073758 commented Apr 8, 2014

Surprisingly, there is no backend-independent, nor OS-independent way of setting the size of a figure in units of the screen dimensions.

I think it should be possible to call e.g. figure(scrsize=[0,0,0.5,0.5]) to get a figure in the lower left quadrant of the screen, just like you specify axes dimensions w.r.t. to the current figure.

@pelson
Copy link
Member

pelson commented Jun 25, 2014

If you use TkAgg it is possible to "set the geometry" of the window using the created Tkinter master window, which is stored on the TkAgg Canvas instance of a figure (source http://www.gossamer-threads.com/lists/python/python/361055):

import matplotlib.pyplot as plt
fig = plt.figure()
fig.canvas._master.geometry('900x800+0+0') 
plt.show()

This kind of functionality needn't live in matplotlib itself - it would make an excellent standalone project which can handle any of the primary matplotlib backends (not just TkInter).

There would be some work to make this screen resolution independent, but it is all doable - I think it would be really useful functionality and already I am thinking of some of the cool things you could do with it (e.g. pass a list of figures and have them arranged in a tiled or cascaded form on screen).

The only sticking point with all of this is that I'm just not convinced that matplotlib has enough developer cycles to take this on as well as developing and maintaining an already bulging project. Hopefully this will spur you (or somebody else) to give this a go, as it sounds like an awesome project - but I'm going to close it as a mpl issue.

Thanks @a6073758

@pelson pelson closed this as completed Jun 25, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants