malet.plot_utils.utils#
Attributes#
Functions#
|
Creates a directory, clearing all contents if it already exists. |
|
Merge plot_config dict (priority: |
|
Applies matplotlib styling to axes from a style dictionary. |
Module Contents#
- malet.plot_utils.utils.create_dir(dir)[source]#
Creates a directory, clearing all contents if it already exists.
- Parameters:
dir – Path of the directory to create or clear.
- malet.plot_utils.utils.merge_dict(base: dict, other: dict)[source]#
Merge plot_config dict (priority:
base)
- malet.plot_utils.utils.default_style#
- malet.plot_utils.utils.ax_styler(ax: matplotlib.axes.Axes, **style_dict)[source]#
Applies matplotlib styling to axes from a style dictionary.
Handles special keys ‘fig_size’ and ‘frame_width’ directly, then delegates remaining entries to the corresponding axes methods (
set_<name>or direct attribute for tick_params, legend, grid).- Parameters:
ax – Matplotlib axes to style.
**style_dict – Style parameters where each value is a list of positional args followed by a keyword-arg dict as the last element.