molgri.plotting.abstract
Abstract implementation of plots and multi-plots.
All other plots extend RepresentationCollection. Each RepresentationCollection has a set of methods used to view the data of the object with which the Collection is initiated in different ways. Plotting methods always posses ax and fig arguments so that several plots can be plotted on top of each other or next to each other.
MultiRepresentationCollection provides functionality for combining several plots in one image. PanelRepresentationCollection specifically creates one sub-plot for each grid-generating algorithm.
Functions
|
|
|
Classes
|
|
|
|
|
Most general plotting class. |
- class molgri.plotting.abstract.RepresentationCollection(data_name: str, fig_path: str = 'output/figures/', ani_path: str = 'output/animations/', default_figsize: tuple = (4.45, 4.45), default_context: str | None = None, default_color_style: str | None = None, default_complexity_level: str | None = None, default_axes_limits: tuple = (None, None, None, None, None, None))
Most general plotting class. Set all methods that could be useful for many various types of plots here. All other plots, including multiplots, inherit from this class.
In the __init__, defaults should be set that will generally be used for an entire class of figures - but it is still possible to not use defaults for some of the plots.
- Args:
data_name: keyword that combines all figures of a specific sub-class fig_path: folder to save figures if created, should be set in subclasses ani_path: folder to save animations if created, should be set in subclasses default_context: forwarded to sns.set_context -> should be one of: paper, notebook, talk, poster default_color_style: describes the general color scheme of the plots (dark, white) default_complexity_level: select from full, half_empty, empty
- __init__(data_name: str, fig_path: str = 'output/figures/', ani_path: str = 'output/animations/', default_figsize: tuple = (4.45, 4.45), default_context: str | None = None, default_color_style: str | None = None, default_complexity_level: str | None = None, default_axes_limits: tuple = (None, None, None, None, None, None))
In the __init__, defaults should be set that will generally be used for an entire class of figures - but it is still possible to not use defaults for some of the plots.
- Args:
data_name: keyword that combines all figures of a specific sub-class fig_path: folder to save figures if created, should be set in subclasses ani_path: folder to save animations if created, should be set in subclasses default_context: forwarded to sns.set_context -> should be one of: paper, notebook, talk, poster default_color_style: describes the general color scheme of the plots (dark, white) default_complexity_level: select from full, half_empty, empty
- get_possible_title()
- class molgri.plotting.abstract.MultiRepresentationCollection(data_name, list_plots: List[RepresentationCollection], figsize=None, n_rows: int = 4, n_columns: int = 2)
- __init__(data_name, list_plots: List[RepresentationCollection], figsize=None, n_rows: int = 4, n_columns: int = 2)
- add_titles(list_titles, **title_kwargs)
- set_log_scale(x_axis=True, y_axis=True)
- add_legend(**legend_kwargs)
This adds one overall legend to the entire multiplot, only using unique handles.
- unify_axis_limits(x_ax=True, y_ax=True, z_ax=True)
Unifies the min and max ranges of all subplots for selected axes.
- animate_figure_view(plot_type: str) FuncAnimation
Rotate all 3D figures for 360 degrees around themselves and save the animation.
- add_colorbar(**cbar_kwargs)
- class molgri.plotting.abstract.PanelRepresentationCollection(data_name, list_plots: List[RepresentationCollection], landscape=True, figsize=None)
- __init__(data_name, list_plots: List[RepresentationCollection], landscape=True, figsize=None)
- molgri.plotting.abstract.show_anim_in_jupyter(anim)
- molgri.plotting.abstract.plot_voronoi_cells(sv, ax, plot_vertex_points=True)