dashes and dpi?

Alan -

You started a discussion about dpi on the figures.
Yet here you claim that 1pt = 1/72 inch.
Is that always the case?
And why? How does mpl figure that out, if there are also different dpi settings?

The plot thickens…

Mark

···

Alan Isaac wrote:

Note: 1pt = 1/72 inch

hth,
Alan Isaac

Based on the discussion for far,
I assume it works like this.

(figsize in inches) * dpi = (size in pixels)

So if you draw a line 72 points long,
which is 1" in figsize units,
then it will display as being dpi pixels in length.

So for PNG, for example, figsize is a kind of
Platonic concept, which we view dimly through
the actual size of our figure.

By the way, I've discovered that browser scaling
of PNGs does not work very well (fuzzy fonts), so
setting both figsize and dpi correctly proves
rather important. In contrast to best practice
for loading speed, you should not set the size
of your IMG element. Or so it seems.

fwiw,
Alan

···

On Fri, 1 Feb 2008, Mark Bakker apparently wrote:

you claim that 1pt = 1/72 inch. Is that always the case?
And why? How does mpl figure that out

Mark Bakker wrote:

Alan -

You started a discussion about dpi on the figures.
Yet here you claim that 1pt = 1/72 inch.
Is that always the case?

Yes, I that's *by definition* always the case !

pt is a point - not a dot or a pixel !!!

"Point" is a unit of measurement used in typography that is equal to 1/72 inch. It is used primarily for representing the height of characters and the amount of space between lines, also known as leading.

   --> see http://support.microsoft.com/kb/76388

Manuel

···

And why? How does mpl figure that out, if there are also different dpi
settings?
The plot thickens...

Mark

Alan Isaac wrote:

Note: 1pt = 1/72 inch

hth,
Alan Isaac

------------------------------------------------------------------------

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/

------------------------------------------------------------------------

_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Mark Bakker wrote:

Alan -

You started a discussion about dpi on the figures.
Yet here you claim that 1pt = 1/72 inch.
Is that always the case?

Barring any bugs, yes.

And why? How does mpl figure that out, if there are also different dpi settings?

The conversion from points to pixels is simply "dpi * points / 72.0".

Cheers,
Mike

···

The plot thickens...

Mark

    Alan Isaac wrote:

    Note: 1pt = 1/72 inch

    hth,
    Alan Isaac

------------------------------------------------------------------------

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/

------------------------------------------------------------------------

_______________________________________________
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

Alan G Isaac wrote:

you claim that 1pt = 1/72 inch. Is that always the case? And why? How does mpl figure that out

I wrote this to help clarify some of these issues:

http://www.scipy.org/Cookbook/Matplotlib/AdjustingImageSize

By the way, I've discovered that browser scaling
of PNGs does not work very well (fuzzy fonts),

right, scaling rasters is never optimum.

so
setting both figsize and dpi correctly proves
rather important.

exactly.

In contrast to best practice
for loading speed, you should not set the size
of your IMG element.

you can set it, but make sure it matches the actual image size. That will get you the rendering speed, with no quality penalty.

-Chris

···

On Fri, 1 Feb 2008, Mark Bakker apparently wrote:

--
Christopher Barker, Ph.D.
Oceanographer

Emergency Response Division
NOAA/NOS/OR&R (206) 526-6959 voice
7600 Sand Point Way NE (206) 526-6329 fax
Seattle, WA 98115 (206) 526-6317 main reception

Chris.Barker@...259...

Mark Bakker wrote:

Yet here you claim that 1pt = 1/72 inch.
Is that always the case?

Kind of. This is a typesetting measurement originally having nothing to do with computers, displays or graphics files. However at Wikipedia they say its definition has changed over time.
http://en.wikipedia.org/wiki/Point_(typography)