From fddd14eed81fce804e91ead0a546aa9d6256cb09 Mon Sep 17 00:00:00 2001 From: Aaron LI Date: Fri, 24 Nov 2017 20:59:04 +0800 Subject: astro/ps2d.py: Use same colormap (scales) for error power spectrum --- astro/ps2d.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'astro') diff --git a/astro/ps2d.py b/astro/ps2d.py index accdf54..27c4328 100755 --- a/astro/ps2d.py +++ b/astro/ps2d.py @@ -274,6 +274,7 @@ class PS2D: mappable = ax.pcolormesh(x[1:], y[1:], np.log10(self.ps2d[0, 1:, 1:]), cmap=colormap) + vmin, vmax = mappable.get_clim() ax.set(xscale="log", yscale="log", xlim=(x[1], x[-1]), ylim=(y[1], y[-1]), xlabel=r"k$_{\perp}$ [Mpc$^{-1}$]", @@ -287,6 +288,7 @@ class PS2D: mappable = ax_err.pcolormesh(x[1:], y[1:], np.log10(error[1:, 1:]), cmap=colormap) + mappable.set_clim(vmin, vmax) ax_err.set(xscale="log", yscale="log", xlim=(x[1], x[-1]), ylim=(y[1], y[-1]), xlabel=r"k$_{\perp}$ [Mpc$^{-1}$]", -- cgit v1.2.2