Skip to content

plotnine_prism.themeable

Add themeables for theme_prism

Classes
class

plotnine_prism.themeable.axis_ticks_x(theme_element=None)

Bases
plotnine.themes.themeable.axis_ticks_major_x plotnine.themes.themeable.axis_ticks_minor_x plotnine.themes.themeable.themeable

Themeable for ticks on x axis that is missing in plotnine

Attributes
  • rcParams Return themeables rcparams to an rcparam dict before plotting.</>
Methods
  • __eq__(other) (bool) Mostly for unittesting.</>
  • apply(theme) Called by the theme to apply the themeable</>
  • apply_ax(ax) Apply themeable to the axis</>
  • apply_figure(figure, targets) Apply theme to the figure</>
  • blank_ax(ax) When it's set blank</>
  • blank_figure(figure, targets) Blank out elements on the figure</>
  • from_class_name(name, theme_element) (out : Themeable) Create an themeable by name</>
  • is_blank() (bool) Return True if theme_element is made of element_blank</>
  • merge(other) Merge properties of other into self</>
  • setup_figure(figure) Apply theme to the figure</>
staticmethod

from_class_name(name, theme_element)

Create an themeable by name

Parameters
  • name (str) Class name
  • theme_element (element object) A of the type required by the themeFor lines, text and rects it should be one of: :class:element_line, :class:element_rect, :class:element_text or :class:element_blank
method

is_blank() → bool

Return True if theme_element is made of element_blank

method

merge(other)

Merge properties of other into self

Raises
  • ValueError If any of the properties are blank
method

__eq__(other) → bool

Mostly for unittesting.

method

apply(theme)

Called by the theme to apply the themeable

Subclasses shouldn't have to override this method to customize.

method

apply_figure(figure, targets)

Apply theme to the figure

Compared to :meth:setup_figure, this method is called after plotting and all the elements are drawn onto the figure.

method

setup_figure(figure)

Apply theme to the figure

Compared to :meth:apply_figure, this method is called before any plotting is done. This is necessary in some cases where the drawing functions need(or can make use of) this information.

method

blank_figure(figure, targets)

Blank out elements on the figure

method

apply_ax(ax)

Apply themeable to the axis

method

blank_ax(ax)

When it's set blank

class

plotnine_prism.themeable.axis_ticks_y(theme_element=None)

Bases
plotnine.themes.themeable.axis_ticks_major_y plotnine.themes.themeable.axis_ticks_minor_y plotnine.themes.themeable.themeable

Themeable for ticks on y axis that is missing in plotnine

Attributes
  • rcParams Return themeables rcparams to an rcparam dict before plotting.</>
Methods
  • __eq__(other) (bool) Mostly for unittesting.</>
  • apply(theme) Called by the theme to apply the themeable</>
  • apply_ax(ax) Apply themeable to the axis</>
  • apply_figure(figure, targets) Apply theme to the figure</>
  • blank_ax(ax) When it's set blank</>
  • blank_figure(figure, targets) Blank out elements on the figure</>
  • from_class_name(name, theme_element) (out : Themeable) Create an themeable by name</>
  • is_blank() (bool) Return True if theme_element is made of element_blank</>
  • merge(other) Merge properties of other into self</>
  • setup_figure(figure) Apply theme to the figure</>
staticmethod

from_class_name(name, theme_element)

Create an themeable by name

Parameters
  • name (str) Class name
  • theme_element (element object) A of the type required by the themeFor lines, text and rects it should be one of: :class:element_line, :class:element_rect, :class:element_text or :class:element_blank
method

is_blank() → bool

Return True if theme_element is made of element_blank

method

merge(other)

Merge properties of other into self

Raises
  • ValueError If any of the properties are blank
method

__eq__(other) → bool

Mostly for unittesting.

method

apply(theme)

Called by the theme to apply the themeable

Subclasses shouldn't have to override this method to customize.

method

apply_figure(figure, targets)

Apply theme to the figure

Compared to :meth:setup_figure, this method is called after plotting and all the elements are drawn onto the figure.

method

setup_figure(figure)

Apply theme to the figure

Compared to :meth:apply_figure, this method is called before any plotting is done. This is necessary in some cases where the drawing functions need(or can make use of) this information.

method

blank_figure(figure, targets)

Blank out elements on the figure

method

apply_ax(ax)

Apply themeable to the axis

method

blank_ax(ax)

When it's set blank

Bases
plotnine.themes.themeable.themeable

Themeable for ticks length on x axis

Attributes
  • rcParams Return themeables rcparams to an rcparam dict before plotting.</>
Methods
  • __eq__(other) (bool) Mostly for unittesting.</>
  • apply(theme) Called by the theme to apply the themeable</>
  • apply_ax(ax) Apply themeable to the axis</>
  • apply_figure(figure, targets) Apply theme to the figure</>
  • blank_ax(ax) When it's set blank</>
  • blank_figure(figure, targets) Blank out elements on the figure</>
  • from_class_name(name, theme_element) (out : Themeable) Create an themeable by name</>
  • is_blank() (bool) Return True if theme_element is made of element_blank</>
  • merge(other) Merge properties of other into self</>
  • setup_figure(figure) Apply theme to the figure</>
staticmethod

from_class_name(name, theme_element)

Create an themeable by name

Parameters
  • name (str) Class name
  • theme_element (element object) A of the type required by the themeFor lines, text and rects it should be one of: :class:element_line, :class:element_rect, :class:element_text or :class:element_blank
method

is_blank() → bool

Return True if theme_element is made of element_blank

method

merge(other)

Merge properties of other into self

Raises
  • ValueError If any of the properties are blank
method

__eq__(other) → bool

Mostly for unittesting.

method

apply(theme)

Called by the theme to apply the themeable

Subclasses shouldn't have to override this method to customize.

method

apply_figure(figure, targets)

Apply theme to the figure

Compared to :meth:setup_figure, this method is called after plotting and all the elements are drawn onto the figure.

method

setup_figure(figure)

Apply theme to the figure

Compared to :meth:apply_figure, this method is called before any plotting is done. This is necessary in some cases where the drawing functions need(or can make use of) this information.

method

blank_figure(figure, targets)

Blank out elements on the figure

method

apply_ax(ax)

Apply themeable to the axis

method

blank_ax(ax)

When it's set blank

Bases
plotnine.themes.themeable.themeable

Themeable for ticks length on y axis

Attributes
  • rcParams Return themeables rcparams to an rcparam dict before plotting.</>
Methods
  • __eq__(other) (bool) Mostly for unittesting.</>
  • apply(theme) Called by the theme to apply the themeable</>
  • apply_ax(ax) Apply themeable to the axis</>
  • apply_figure(figure, targets) Apply theme to the figure</>
  • blank_ax(ax) When it's set blank</>
  • blank_figure(figure, targets) Blank out elements on the figure</>
  • from_class_name(name, theme_element) (out : Themeable) Create an themeable by name</>
  • is_blank() (bool) Return True if theme_element is made of element_blank</>
  • merge(other) Merge properties of other into self</>
  • setup_figure(figure) Apply theme to the figure</>
staticmethod

from_class_name(name, theme_element)

Create an themeable by name

Parameters
  • name (str) Class name
  • theme_element (element object) A of the type required by the themeFor lines, text and rects it should be one of: :class:element_line, :class:element_rect, :class:element_text or :class:element_blank
method

is_blank() → bool

Return True if theme_element is made of element_blank

method

merge(other)

Merge properties of other into self

Raises
  • ValueError If any of the properties are blank
method

__eq__(other) → bool

Mostly for unittesting.

method

apply(theme)

Called by the theme to apply the themeable

Subclasses shouldn't have to override this method to customize.

method

apply_figure(figure, targets)

Apply theme to the figure

Compared to :meth:setup_figure, this method is called after plotting and all the elements are drawn onto the figure.

method

setup_figure(figure)

Apply theme to the figure

Compared to :meth:apply_figure, this method is called before any plotting is done. This is necessary in some cases where the drawing functions need(or can make use of) this information.

method

blank_figure(figure, targets)

Blank out elements on the figure

method

apply_ax(ax)

Apply themeable to the axis

method

blank_ax(ax)

When it's set blank

class

plotnine_prism.themeable.prism_ticks_length(theme_element=None)

Themeable for ticks length

Attributes
  • rcParams Return themeables rcparams to an rcparam dict before plotting.</>
Methods
  • __eq__(other) (bool) Mostly for unittesting.</>
  • apply(theme) Called by the theme to apply the themeable</>
  • apply_ax(ax) Apply themeable to the axis</>
  • apply_figure(figure, targets) Apply theme to the figure</>
  • blank_ax(ax) When it's set blank</>
  • blank_figure(figure, targets) Blank out elements on the figure</>
  • from_class_name(name, theme_element) (out : Themeable) Create an themeable by name</>
  • is_blank() (bool) Return True if theme_element is made of element_blank</>
  • merge(other) Merge properties of other into self</>
  • setup_figure(figure) Apply theme to the figure</>
staticmethod

from_class_name(name, theme_element)

Create an themeable by name

Parameters
  • name (str) Class name
  • theme_element (element object) A of the type required by the themeFor lines, text and rects it should be one of: :class:element_line, :class:element_rect, :class:element_text or :class:element_blank
method

is_blank() → bool

Return True if theme_element is made of element_blank

method

merge(other)

Merge properties of other into self

Raises
  • ValueError If any of the properties are blank
method

__eq__(other) → bool

Mostly for unittesting.

method

apply(theme)

Called by the theme to apply the themeable

Subclasses shouldn't have to override this method to customize.

method

apply_figure(figure, targets)

Apply theme to the figure

Compared to :meth:setup_figure, this method is called after plotting and all the elements are drawn onto the figure.

method

setup_figure(figure)

Apply theme to the figure

Compared to :meth:apply_figure, this method is called before any plotting is done. This is necessary in some cases where the drawing functions need(or can make use of) this information.

method

blank_figure(figure, targets)

Blank out elements on the figure

method

apply_ax(ax)

Apply themeable to the axis

method

blank_ax(ax)

When it's set blank