grapa.plot.plot_graph_aux.SubplotsAdjuster
- class grapa.plot.plot_graph_aux.SubplotsAdjuster
Bases:
objectA utility class for managing and adjusting subplot_adjust parameter of matplotlib.
Methods:
- default():
Retrieves the default subplots_adjust parameters from Matplotlib’s rcParams.
- merge(default, spa_user, fig):
Merges default subplot parameters with user-defined parameters, handling relative adjustments and figure size scaling.
Parameters: - default (dict): Dictionary of default subplot parameters.
spa_user (dict, or list): User-defined subplot adjustment parameters. Can be a string, dictionary, or list specifying adjustments.
fig (matplotlib.figure.Figure or tuple or lsit): Either a Matplotlib figure object or a tuple specifying the figure size.
Returns:
dict: A dictionary containing the merged subplot adjustment parameters.
- __init__()
Methods
default()Retrieves matplotlib default subplots_adjust parameters in rcParams
merge(default, spa_user, fig)- classmethod default()
Retrieves matplotlib default subplots_adjust parameters in rcParams
- classmethod merge(default, spa_user, fig)
- Parameters:
default – dict of default parameters
spa_user – dict, list, or float of user-defined parameters if single float: interpreted as ‘bottom’. if spa_user[-1] is ‘abs’, all values are understood in terms of absolute values and not relative as usually the case
fig – either a figure, or a list or tuple of 2 elements ‘figsize’