cowpatch.text_elements
Module Contents
Classes
create a new text object |
- class cowpatch.text_elements.text(label, element_text=None, theme=None)[source]
create a new text object
- Parameters
label (string) – text label with desirable format (e.g. sympy, etc.)
element_text (plotnine.themes.elements.element_text) – element object from plotnine, can also be added later
theme (plotnine.theme object) – theme object from plotnine, can be associated later should only provide a theme or element_text (as a theme contains an element_text)
Notes
This class leverages matplotlib to create the text (given that matplotlib can create path-style objects for text if the individual is worried that the svg text visually won’t be preserved - this is also annoying that this is the default).
Note the function use the
text
attribute - NOT theplot_title
attribute if a theme is provided.