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
m
Meters
cm
Centimeters
mm
Millimeters
ft
Feet
in
Inches
pt
Points (1/72 inches)
px
Pixels on screen, uses dpi of
rc[‘figure.dpi’]
pp
Pixels once printed, uses dpi of
rc[‘savefig.dpi’]
em
Em-square for
rc[‘font.size’]
ex
Ex-square for
rc[‘font.size’]
Em
Em-square for
rc[‘axes.titlesize’]
Ex
Ex-square for
rc[‘axes.titlesize’]
numeric (str, optional) – The assumed unit for numeric arguments, and the output unit. Default is inches, i.e.
'in'
.