There may be a limitation on window sizes in the various GUI backends.  
Have you tried using the non-GUI backend (agg), and now "show"ing it, 
but just using "savefig"?

Mike

doct...@users.sourceforge.net wrote:
> I'm trying to make a 10 inch wide by 30 inch high, 72 dpi figure and
> display it interactively.  Matplotlib seems to squash the height for
> anything over a certain size, depending on the backend:
>
> ---------------------------------------------------
> #!/usr/bin/env python
>
> import sys, os, matplotlib
> matplotlib.use('TkAgg')
> import matplotlib.pyplot as plt
>
> print os.uname()
> print sys.version
> print matplotlib.__version__
> print
>
> f = plt.figure(figsize=(10,30), dpi=72)
> print "figheight before show(): %f" % f.get_figheight()
> plt.show()
> print "figheight after show():  %f" % f.get_figheight()
> --------------------------------------------------
>
> Prints this:
>
> ==========================
> ('Linux', 'prime', '2.6.31-14-generic', '#48-Ubuntu SMP Fri Oct 16
> 14:05:01 UTC 2009', 'x86_64')
> 2.6.4 (r264:75706, Nov  2 2009, 14:44:17)
> [GCC 4.4.1]
> 0.99.0
>
> figheight before show(): 30.000000
> figheight after show():  22.027778
> ==========================
>
> Tk squashes heights over 12 inches (the heights do get larger as you
> request larger figures, but not as large as what you request); GTK
> goes up to 11; and Qt4Agg only goes up to 7.3.  WX seems to be the
> only backend that will give me a 30 inch figure, but even then I have
> to manually resize the window to make it fit.  This happens in scripts
> with pyplot, in ipython with or without -pylab, and via the matplotlib
> API.
>
> Is there some limitation on figure sizes?
>
> ------------------------------------------------------------------------------
> Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
> trial. Simplify your report design, integration and deployment - and focus on 
> what you do best, core application coding. Discover what's new with
> Crystal Reports now.  http://p.sf.net/sfu/bobj-july
> _______________________________________________
> Matplotlib-users mailing list
> Matplotlib-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>   

-- 
Michael Droettboom
Science Software Branch
Operations and Engineering Division
Space Telescope Science Institute
Operated by AURA for NASA


------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to