On 3/16/07, Bill Baxter <[EMAIL PROTECTED]> wrote:
> Why does pylab.matshow() create a new figure by default when no other
> standard pylab function I know of does that?  It seems very
> inconsistent for no particular gain, since as always
> figure();matshow(m) will achieve that result if that is what is
> desired.

No: matshow has to create a figure with a non-standard size so that
the final figure has the same aspect ratio as the array being
displayed.  If you call figure() first, the figure has already been
created.

The code:

    # Extract actual aspect ratio of array and make appropriately sized figure
    w,h = figaspect(arr)
    fig = figure(fignum,figsize=(w,h))


Cheers,

f

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to