GraphicsBase
The base class for all things Graphics Defines the common parts of the interface
opt_keys: set
layout_keys: set
known_keys: set
axes_params: set
inset_options: dict
axes_keys: set
get_raw_attr(self, key):
__init__(self, *args, name=None, figure=None, tighten=False, axes=None, subplot_kw=None, parent=None, image_size=None, padding=None, aspect_ratio=None, interactive=None, reshowable=None, backend='matplotlib', backend_options=None, theme=None, prop_manager=<class 'McUtils.Plots.Properties.GraphicsPropertyManager'>, theme_manager=<class 'McUtils.Plots.Styling.ThemeManager'>, managed=None, strict=True, **opts):
args:Anyfigure:GraphicsFigure | Noneaxes:GraphicsAxes | Nonesubplot_kw:dict | Noneparent:GraphicsBase | Noneopts:Any
initialize_figure_and_axes(self, figure, axes, *args, **kw) -> 'tuple[GraphicsFigure, GraphicsAxes]':
Initializes the subplots for the Graphics object
figure:Anyaxes:Anyargs:Anykw:Any:returns:GraphicsFigure, GraphicsAxesf i g u r e ,
a x e s
@property
parent(self):
@property
figure_parent(self):
@property
inset(self):
@property
children(self):
@property
event_handlers(self):
@property
animated(self):
bind_events(self, *handlers, **events):
create_animation(self, *args, **opts):
animate_frames(self, frames, **opts):
set_options(self, event_handlers=None, animated=None, prolog=None, epilog=None, strict=True, **opts):
Sets options for the plot
event_handlers:Anyanimated:Anyopts:Any:returns:_
@property
prolog(self):
@property
epilog(self):
@property
opts(self):
copy(self, **kwargs):
Creates a copy of the object with new axes and a new figure
:returns:_
change_figure(self, new, *init_args, figs=None, **init_kwargs):
Creates a copy of the object with new axes and a new figure
:returns:_
prep_show(self):
show(self, reshow=None):
close(self, force=False):
__del__(self):
__repr__(self):
clear(self):
savefig(self, where, expanduser=True, format=None, **kw):
Saves the image to file
where:Anyformat:Anykw:Any:returns:strf i l e
i t
w a s
s a v e d
t o
( I
t h i n k . . . ? )
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:_
to_widget(self):
create_colorbar_axis(self, figure=None, size=(20, 200), tick_padding=40, origin=None, orientation='vertical', alignment=None):
add_colorbar(self, graphics=None, norm=None, cmap=None, size=None, orientation='vertical', origin=None, tick_padding=40, colorbar_axes=None, cax=None, **kw):
create_inset(self, bbox, coordinates='scaled', graphics_class=None, **opts):