units¶
-
units(value, numeric='in')[source]¶ Flexible units – this function is used internally all over ProPlot, so that you don’t have to use “inches” or “points” for all sizing arguments. See this link for info on the em square units.
- Parameters
value (float or str or list thereof) – A size “unit” or list thereof. If numeric, assumed unit is
numeric. If string, we look for the format'123.456unit', where the number is the value and'unit'is one of the following.Unit
Description
mMeters
cmCentimeters
mmMillimeters
ftFeet
inInches
ptPoints (1/72 inches)
pxPixels on screen, uses dpi of
rc[‘figure.dpi’]ppPixels once printed, uses dpi of
rc[‘savefig.dpi’]emEm-square for
rc[‘font.size’]exEx-square for
rc[‘font.size’]EmEm-square for
rc[‘axes.titlesize’]ExEx-square for
rc[‘axes.titlesize’]numeric (str, optional) – The assumed unit for numeric arguments, and the output unit. Default is inches, i.e.
'in'.