Just to clarify: the OFFICIAL definition of an inch is 2.54 cm.
So rounding errors shouldn’t be much of a problem.


Date: Mon, 29 Oct 2007 09:37:06 -0400
From: Michael Droettboom <mdroe@…31…>

I agree that we have to remain in inches internally. Non-metric units
are pretty ingrained in the printing world (not just in matplotlib) –

Postscript, for example, always does page sizes in inches, even if
you’re using a “metric” page size like A4. The current definition of a
point as 1/72 of a modern inch is also fairly standard worldwide. Even

printers in France, for example, are spec’d in points par pouce (ppp),
which is exactly equivalent to dots per inch (dpi).

However, that’s just an implementation detail we have to stick with.
Matplotlib has Figure.get/set_size_inches now. What’s to stop us from
adding get/set_size_cm, and doing the conversion right there? There
might be some rounding error, but I don’t think it matters in this
particular case. We would probably also want to add a “figsize_cm”

kwarg to the Figure constructor (which would be mutually exclusive to
“figsize”). What do you think?