graphinglib.PlottableAxMethod#

class graphinglib.PlottableAxMethod(meth: str, *args, label: str | None = None, **kwargs)[source]#

This experimental class allows to call any matplotlib Axes method as a plottable element in a SmartFigure. This object can be used to create plot types that have not yet been implemented in GraphingLib.

This class only works with Axes methods that create plottable elements (e.g., bar or pcolormesh). Methods that modify axes properties (e.g., set_facecolor, set_title) are not supported.

Parameters:
methstr

Name of the matplotlib Axes method to call. The method will be called as axes.meth(*args, **kwargs). For example, this can be “pcolormesh” or “bar”.

Warning

The provided matplotlib Axes method must accept a zorder keyword argument to be compatible with this class. If not, an exception will be raised when attempting to plot the element.

*args

Positional arguments to pass to axes.meth.

labelstr, optional

Label to be attached to the PlottableAxMethod.

**kwargs

Keyword arguments to pass to axes.meth.

Methods

__init__(meth, *args[, label])

copy_with(**kwargs)

Returns a deep copy of the Plottable with specified attributes overridden.