cowpatch.utils
Module Contents
Functions
|
|
|
|
|
|
|
|
|
|
|
convert length from given units to pt |
|
convert length from pt to given units |
|
convert length from given units to pt |
|
convert length from inches to given units |
|
checks if object is a plotnine one (but really only checks if comes |
- cowpatch.utils.to_pt(value, units, dpi=96)[source]
convert length from given units to pt
- Parameters
value (float) – length in measurement units
units (str) – unit type (e.g. “pt”, “px”, “in”, “cm”, “mm”)
dpi (float / int) – dots per inch (conversion between inches and px)
- Return type
length in pt
- cowpatch.utils.from_pt(value, units, dpi=96)[source]
convert length from pt to given units
- Parameters
value (float) – length in pt
units (str) – unit type (e.g. “pt”, “px”, “in”, “cm”, “mm”) to convert to
dpi (float / int) – dots per inch (conversion between inches and px)
- Return type
length given units
- cowpatch.utils.to_inches(value, units, dpi=96)[source]
convert length from given units to pt
- Parameters
value (float) – length in measurement units
units (str) – unit type (e.g. “pt”, “px”, “in”, “cm”, “mm”)
dpi (float / int) – dots per inch (conversion between inches and px)
- Return type
length in pt
- cowpatch.utils.from_inches(value, units, dpi=96)[source]
convert length from inches to given units
- Parameters
value (float) – length in inches
units (str) – unit type (e.g. “pt”, “px”, “in”, “cm”, “mm”) to convert to
dpi (float / int) – dots per inch (conversion between inches and px)
- Return type
length given units