aboutsummaryrefslogtreecommitdiffstats
path: root/astro
diff options
context:
space:
mode:
authorAaron LI <aly@aaronly.me>2017-11-24 20:59:04 +0800
committerAaron LI <aly@aaronly.me>2017-11-24 20:59:04 +0800
commitfddd14eed81fce804e91ead0a546aa9d6256cb09 (patch)
treef57384ef19f4cb0e23d307cb6625d32ece761bab /astro
parent5ffda42d86f4126d7f53d038f73c29ef10932c1a (diff)
downloadatoolbox-fddd14eed81fce804e91ead0a546aa9d6256cb09.tar.bz2
astro/ps2d.py: Use same colormap (scales) for error power spectrum
Diffstat (limited to 'astro')
-rwxr-xr-xastro/ps2d.py2
1 files changed, 2 insertions, 0 deletions
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}$]",