molgri.plotting.other_plots
Plotting 2D array as heatmap.
Classes
|
A tool for plotting arrays, eg by highlighting high and low values |
- class molgri.plotting.other_plots.ArrayPlot(my_array: ndarray[Any, dtype[ScalarType]], *args, data_name='array', **kwargs)
A tool for plotting arrays, eg by highlighting high and low values
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__(my_array: ndarray[Any, dtype[ScalarType]], *args, data_name='array', **kwargs)
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
- make_heatmap_plot(ax: Axes | None = None, fig: Figure | None = None, save: bool = True)
This method draws the array and colors the fields according to their values (red = very large, blue = very small). Zero values are always white, negative ones always blue, positive ones always red.