lionel keene wrote:
> Hello all, I'd like to create a "matplotlib.pyplot.figure(...)" object
> and specify the size while I'm at it. I see this argument list from
> the matplotlib's documentation:
>
> pyplot.figure(num=None, figsize=(8, 6), dpi=80, facecolor='w', edgecolor='k')
>
> The on-screen size is being computed using inches (for height and
> width) and dpi. But I don't know what the dpi is in advance. What can
> I do? In case it's relevant, I'm using Python 2.5 and the latest
> download of matplotlib.
>
> Thanks in advance.
>
> -L
I'm not quite sure I understand; if you don't know the dpi when you
create the figure, when *will* you know it?
Lack of knowledge of the actual dpi of a display is a general problem,
and I don't know of any general solution. Typically one has to guess,
or let the user measure it and input it as a variable at the start of a
graphics program. Ideally, every display would communicate its dpi to
the operating system, and graphics software would be able to read and
use this value. I don't know if any systems actually work this way.
Eric
|