Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have wondered more and more often lately how the size of an image is handled when displayed or exported. The documentation implies that the via ImageSize the size could be set in printer points (per inch). That does however not correspond with the displayed graphics (for instance ImageSize-> {72 1, 72 1 }) does not render a generic plot with the expected size of one inch square. (UI magnification at 100%)

I am using Mathematica 9 on OS X 10.9 and usually use .eps for exporting plots (since .pdf export doesn't really work that well with fonts and all)

share|improve this question
This is Export-related only (but duplicate-ish): I guess sizes on-screen are another animal entirely. – Yves Klett Nov 19 '13 at 15:06
ImageSize only changes the display. To actually change the size of the image in pixels (for instance when you export), use ImageResize. Then you can specify exactly how big/small you want it. – bill s Nov 19 '13 at 15:29
For exporting to PDF, I sometimes need to use the workaround cm = 72/2.54; Export["file.pdf", Show[graphics, ImageSize -> 10 cm]]. This gives a size of precisely 10 cm. – Szabolcs Nov 19 '13 at 17:50
Take a look here, some of the ideas may be of use to you. – Szabolcs Nov 19 '13 at 20:48
up vote 4 down vote accepted

I export graphics like this:

m = 72/2.54;
Export["file.pdf", Show[graphics, ImageSize -> 10 cm]]

For some reason Show is required when exporting to PDF, i.e. you can't just use the ImageSize option directly in Export and still get the expected result.

Regarding display on screen, ImageSize is interpreted as pixels for on-screen display and as PostScript points (1/72 inch) for exporting to printable formats such as PDF. In other words, Mathematica always assumes the display to be a 72 ppi one.

share|improve this answer
N.B. ImageSize is (documented to be) printer's points whether onscreen or on paper. It just happens that many screens have (or used to have) 72 pixels per inch, and Mathematica uses this as a default instead of the actual resolution, as you noted in your answer in the link. Why it does this, I don't quite know. – Oleksandr R. Apr 20 '14 at 1:14
@OleksandrR. and Szabolcs, If I understand correctly that means for MMA pp == px is always True? And this is quite fundamental and not mentioned in documentation, right? p.s. There is m cm naming problem. – Kuba Feb 11 at 14:00
@Kuba what does pp == px mean? – Oleksandr R. Feb 11 at 14:02
@OleksandrR. printer's points, pixels. – Kuba Feb 11 at 14:05
and by always I meant by default. :P – Kuba Feb 11 at 14:05

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.