GraphicsBase

The base class for all things Graphics Defines the common parts of the interface with some calling into matplotlib

Properties and Methods

opt_keys: set

 

__init__(self, *args, figure=None, tighten=False, axes=None, subplot_kw=None, parent=None, image_size=None, padding=None, aspect_ratio=None, non_interactive=None, mpl_backend=None, theme=None, prop_manager=<class 'McUtils.Plots.Properties.GraphicsPropertyManager'>, theme_manager=<class 'McUtils.Plots.Styling.ThemeManager'>, managed=None, **opts): 
  • args: Any

    No description…

  • figure: matplotlib.figure.Figure | None

    No description…

  • axes: matplotlib.axes.Axes | None

    No description…

  • subplot_kw: dict | None

    No description…

  • parent: GraphicsBase | None

    No description…

  • opts: Any

    No description…

 

@property
event_handlers(self): 

 

@property
animated(self): 

 

bind_events(self, *handlers, **events): 

 

create_animation(self, *args, **opts): 

 

set_options(self, event_handlers=None, animated=None, prolog=None, epilog=None, **opts): 

Sets options for the plot

  • event_handlers: Any

    No description…

  • animated: Any

    No description…

  • opts: Any

    No description…

  • :returns: _

    No description…

 

@property
prolog(self): 

 

@property
epilog(self): 

 

__getattr__(self, item): 

 

copy_axes(self): 

Copies the axes object

  • :returns: matplotlib.axes.Axes

    No description…

 

refresh(self): 

Refreshes the axes

  • :returns: _

    No description…

 

@property
opts(self): 

 

copy(self): 

Creates a copy of the object with new axes and a new figure

  • :returns: _

    No description…

 

prep_show(self): 

 

show(self, reshow=True): 

 

close(self): 

 

clear(self): 

 

savefig(self, where, format='png', **kw): 

Saves the image to file

  • where: Any

    No description…

  • format: Any

    No description…

  • kw: Any

    No description…

  • :returns: str

    file it was saved to (I think…?)

 

to_png(self): 

Used by Jupyter and friends to make a version of the image that they can display, hence the extra ‘tight_layout’ call

  • :returns: _

    No description…

 

add_colorbar(self, graphics=None, norm=None, cmap=None, size=(20, 200), tick_padding=40, **kw): 

Examples


Edit Examples or Create New Examples
Edit Template or Create New Template
Edit Docstrings