From 73d0630d93fe674802d1bab9ac6762afd3a04dae Mon Sep 17 00:00:00 2001 From: s-weigand Date: Sun, 7 Jan 2024 18:32:44 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=A9=B9=20Hard=20code=20legend=20position?= =?UTF-8?q?=20in=202D=20plot=20so=20matplotlib=20does=20not=20try=20to=20f?= =?UTF-8?q?ind=20ideal=20position?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reduces plot time from 3min to 3sec --- pyglotaran_extras/plotting/plot_residual.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyglotaran_extras/plotting/plot_residual.py b/pyglotaran_extras/plotting/plot_residual.py index 0f0731eb..36dd06c5 100644 --- a/pyglotaran_extras/plotting/plot_residual.py +++ b/pyglotaran_extras/plotting/plot_residual.py @@ -93,7 +93,7 @@ def plot_residual( res, ax=ax, spectral_axis="y", cycler=cycler, irf_location=irf_location ) ax.set_xlabel("time") - ax.legend() + ax.legend(loc="upper right") if linlog: ax.set_xscale("symlog", linthresh=linthresh) ax.xaxis.set_minor_locator(MinorSymLogLocator(linthresh))