From 9d98f71821cd7bd7a53a7b94a4781924cedab761 Mon Sep 17 00:00:00 2001 From: ChangHoon Hahn Date: Wed, 14 Jul 2021 10:56:32 +0200 Subject: [PATCH] set xlim and ylim based on range for 1D histogram in the diagonal --- src/corner/core.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/corner/core.py b/src/corner/core.py index 53fca73..1b8598f 100644 --- a/src/corner/core.py +++ b/src/corner/core.py @@ -186,6 +186,7 @@ def corner_impl( range=np.sort(range[i]), **hist_kwargs, ) + ax.set_xlim(np.sort(range[i])) else: if gaussian_filter is None: raise ImportError("Please install scipy for smoothing") @@ -196,6 +197,7 @@ def corner_impl( x0 = np.array(list(zip(b[:-1], b[1:]))).flatten() y0 = np.array(list(zip(n, n))).flatten() ax.plot(x0, y0, **hist_kwargs) + ax.set_xlim(np.sort(range[i])) # Plot quantiles if wanted. if len(quantiles) > 0: