From 3ba3b27bc190e4e83d2270dcfb939784b9dce3f7 Mon Sep 17 00:00:00 2001 From: Philipp Arras <parras@mpa-garching.mpg.de> Date: Tue, 24 Jul 2018 17:55:58 +0200 Subject: [PATCH] More verbose error message for plotting --- nifty5/plotting/plot.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nifty5/plotting/plot.py b/nifty5/plotting/plot.py index 2e564a905..e97f5aa45 100644 --- a/nifty5/plotting/plot.py +++ b/nifty5/plotting/plot.py @@ -359,7 +359,7 @@ def plot_finish(**kwargs): ny = kwargs.pop("ny", int(np.ceil(np.sqrt(nplot)))) if nx*ny < nplot: raise ValueError( - 'Figure dimensions not sufficient for number of plots') + 'Figure dimensions not sufficient for number of plots. Available plot slots: {}, number of plots: {}'.format(nx*ny, nplot)) xsize = kwargs.pop("xsize", 6) ysize = kwargs.pop("ysize", 6) fig.set_size_inches(xsize, ysize) -- GitLab