From fcb68aa862ac9e878d17159d8a8c4b2455b901eb Mon Sep 17 00:00:00 2001 From: Felix Fischer <f.fischer@ifas.rwth-aachen.de> Date: Fri, 14 Mar 2025 12:47:28 +0100 Subject: [PATCH] Added png for 2D surfaces --- src/scientific_plots/__init__.py | 2 +- src/scientific_plots/plot_settings.py | 13 ++++++++----- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/src/scientific_plots/__init__.py b/src/scientific_plots/__init__.py index d607b78..530b04e 100644 --- a/src/scientific_plots/__init__.py +++ b/src/scientific_plots/__init__.py @@ -5,4 +5,4 @@ useful across several different projects and repositories. It also contains stub-files with several data-type annotations for scipy and matplot-lib functions.""" -__version__ = "1.8.7" +__version__ = "1.8.8" diff --git a/src/scientific_plots/plot_settings.py b/src/scientific_plots/plot_settings.py index 50538ab..b3c152d 100644 --- a/src/scientific_plots/plot_settings.py +++ b/src/scientific_plots/plot_settings.py @@ -553,8 +553,8 @@ def apply_styles(plot_function: Optional[Callable[Params, None]] = None, *, Arguments -------- - three_d: Create a use this option for 3D-plots - fallback: switch directly to the fallback-style (for debug) + three_d: Use this option for 3D-plots. + fallback: Switch directly to the fallback-style (for debug). """ # pylint: disable=too-many-statements @@ -614,11 +614,14 @@ def apply_styles(plot_function: Optional[Callable[Params, None]] = None, *, plt.set_cmap("Greys") new_kwargs = copy(kwargs) new_kwargs["colorscheme"] = "Greys" + plt.savefig = new_save_simple("grayscale", png=True, + small=False, + slim=True) else: new_kwargs = kwargs - plt.savefig = new_save_simple("grayscale", png=False, - small=not three_d, - slim=not three_d) + plt.savefig = new_save_simple("grayscale", png=False, + small=True, + slim=True) _plot_function(*args, **new_kwargs) plt.close("all") -- GitLab