From: <ch...@se...> - 2008-10-27 23:17:08
|
I'm confused about what matplotlib.pyplot.figure(figsize = (a,b)) *means* It appears that the figure gets *bigger* as I make a and b *smaller* !??! Chris |
From: Eric F. <ef...@ha...> - 2008-10-27 23:48:44
|
ch...@se... wrote: > I'm confused about what > > matplotlib.pyplot.figure(figsize = (a,b)) *means* a and b are width and height in inches. For vector backends (svg, ps, pdf), that's all there is to it--unless there is a bug. For non-vector output (screen, *.png), the a, b get translated to pixels based on the figure.dpi (if to the screen) or the savefig.dpi (if to a file). If you display such a file on the screen, or print it, the size will depend on the software used for that display or printing, and this is completely out of mpl's control. (Actually, even for vector output, what you see upon display will depend on the software used for display--acroread, evince, gs, ghostview, etc.--and on how it is configured. But at least the vector output formats specify physical sizes in real units, not arbitrary pixels.) > > It appears that the figure gets *bigger* as I make a and b *smaller* !??! > You will need to be more explicit about what you are doing to reach this conclusion. Eric > > Chris > > ------------------------------------------------------------------------- > This SF.Net email is sponsored by the Moblin Your Move Developer's challenge > Build the coolest Linux based applications with Moblin SDK & win great prizes > Grand prize is a trip for two to an Open Source event anywhere in the world > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users |
From: John H. <jd...@gm...> - 2008-10-28 00:23:07
|
On Mon, Oct 27, 2008 at 6:48 PM, Eric Firing <ef...@ha...> wrote: >> It appears that the figure gets *bigger* as I make a and b *smaller* !??! >> > > You will need to be more explicit about what you are doing to reach this > conclusion. What he is probably seeing comes from the fact that some of the figure elements (line width, font size) are in physical dimensions. As you make the figure size smaller with figsize, these dimensions are unchanged, and so they look bigger in proportion to things that scale proportionately with the figsize, eg the axes area. There is not built-in scaling of these physical dimensions with figsize. JDH |