:orphan: :py:mod:`cowpatch.text_elements` ================================ .. py:module:: cowpatch.text_elements Module Contents --------------- Classes ~~~~~~~ .. autoapisummary:: cowpatch.text_elements.text .. py:class:: text(label, element_text=None, theme=None) create a new text object :param label: text label with desirable format (e.g. sympy, etc.) :type label: string :param element_text: element object from plotnine, can also be added later :type element_text: plotnine.themes.elements.element_text :param theme: theme object from plotnine, can be associated later should only provide a theme or element_text (as a theme contains an element_text) :type theme: plotnine.theme object .. rubric:: 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 the ``plot_title`` attribute if a theme is provided. .. py:method:: save(filename, width=None, height=None) save text object as image in minimal size object :param filename: :type filename: str :param width: in inches (if None, then tight (w.r.t. to margins)) :type width: float :param height: in inches (if None, then tight (w.r.t. to margins)) :type height: float