Paul Ivanov <pivanov...@gmail.com> writes:

Thanks.
The tiling manager was the guilty one (I use AWESOME). The set_size
command did not work:
Traceback (most recent call last):
  File "/tmp/py2262sxl", line 45, in <module>
    fig.set_size_inches(pylab.rcParams['figure.figsize'], forward='True')
  File "/usr/lib/pymodules/python2.6/matplotlib/figure.py", line 447, in 
set_size_inches
    manager.resize(int(canvasw), int(canvash))
TypeError: resize() takes exactly 2 arguments (3 given)

But once I mage have made the figure foating, it took the correct size.
Best
Petro
> Hi Petro,
>
> Petro, on 2012-01-11 15:39,  wrote:
>> Can I set a figure to appear on my screen in the same way as it is saved
>> in png file?
>
> You sure can. A likely reason these two don't appear the
> same is that your 'figure.dpi' rcParam is not the same as the
> 'savefig.dpi' parameter. The same may apply to 'figure.facecolor'
> and 'figure.edgecolor' and their savefig counterparts.
>
> Another reason might be that you're using a tiling window
> manager. I use xmonad, and it will resize figures so that they
> all fit on the screen without overlap, and since I put the call
> to plt.show() *after* savefig, the figures get saved as whatever
> size they were originally created as, but then show up as
> whatever space they can fit into given that my window manager
> resized them. You can resize them back, assuming that 'f' is the
> Figure instance, using something like:
>
> f.set_size_inches(plt.rcParams['figure.figsize'], forward=True)
>
> best,

-- 
Petro Khoroshyy


------------------------------------------------------------------------------
RSA(R) Conference 2012
Mar 27 - Feb 2
Save $400 by Jan. 27
Register now!
http://p.sf.net/sfu/rsa-sfdev2dev2
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to