With the unit module PyX makes available classes and
functions for the specification and manipulation of lengths. As usual,
lengths consist of a number together with a measurement unit, e.g.,
[1]cm, [50]points, [0.42]inch. In addition,
lengths in PyX are composed of the five types ``true'', ``user'',
``visual'', ``width'', and ``TEX'', e.g., [1]user cm,
[50]true points,
inch. As their names indicate, they serve different
purposes. True lengths are not scalable and are mainly used for return
values of PyX functions. The other length types can be rescaled by
the user and differ with respect to the type of object they are
applied to:
When not specified otherwise, all types of lengths are interpreted in terms of a default unit, which, by default, is [1]cm. You may change this default unit by using the module level function
| uscale=None, vscale=None, wscale=None, xscale=None, defaultunit=None) |
"cm", "mm", "inch", or "pt".
For instance, if you only want thicker lines for a publication version of your figure, you can just rescale all width lengths using
unit.set(wscale=2)
unit.set(defaultunit="inch")