aboutsummaryrefslogtreecommitdiffstats
path: root/mkcuts_dvp.py
diff options
context:
space:
mode:
Diffstat (limited to 'mkcuts_dvp.py')
-rw-r--r--mkcuts_dvp.py43
1 files changed, 27 insertions, 16 deletions
diff --git a/mkcuts_dvp.py b/mkcuts_dvp.py
index 45be857..508c5b8 100644
--- a/mkcuts_dvp.py
+++ b/mkcuts_dvp.py
@@ -72,31 +72,35 @@ def main():
velX = np.ma.masked_array(velX, mask=np.isnan(velX))
preZ = np.ma.masked_array(preZ, mask=np.isnan(preZ))
preX = np.ma.masked_array(preX, mask=np.isnan(preX))
-
+
# Set Masked Colormap
- cmap = mpl.cm.hot
- cmap.set_bad([0.5, 0.5, 0.5], 1)
+ # cmap = mpl.cm.hot
+ cmap = mpl.cm.jet
+ cmap.set_bad([0.5, 0.5, 0.5])
# Colormaps:
# http://matplotlib.org/examples/pylab_examples/show_colormaps.html
- rho_cm = 'hot'
- vel_cm = 'hot'
- pre_cm = 'hot'
+ # rho_cm = 'hot'
+ # vel_cm = 'hot'
+ # pre_cm = 'hot'
+ rho_cm = cmap
+ vel_cm = cmap
+ pre_cm = cmap
# Compute Image Extent
ext = output.info["boxlen"] * np.array([-0.5, 0.5, -0.5, 0.5])
# Plot Density
- plt.figure(1)
- plt.imshow(rhoZ, cmap=rho_cm, extent=ext)
+ f1 = plt.figure(1)
+ plt.imshow(rhoZ, cmap=rho_cm, extent=ext, interpolation='none')
plt.colorbar()
plt.grid()
plt.title('Log10 Density Cut, t=%.2f' % output.info["time"])
plt.xlabel('X')
plt.ylabel('Y')
- plt.figure(2)
- plt.imshow(rhoX, cmap=rho_cm, extent=ext)
+ f2 = plt.figure(2)
+ plt.imshow(rhoX, cmap=rho_cm, extent=ext, interpolation='none')
plt.colorbar()
plt.grid()
plt.title('Log10 Density Cut, t=%.2f' % output.info["time"])
@@ -104,7 +108,7 @@ def main():
plt.ylabel('Z')
# Plot Velocity
- plt.figure(3)
+ f3 = plt.figure(3)
plt.imshow(velZ, cmap=vel_cm, extent=ext)
plt.colorbar()
plt.grid()
@@ -112,7 +116,7 @@ def main():
plt.xlabel('X')
plt.ylabel('Y')
- plt.figure(4)
+ f4 = plt.figure(4)
plt.imshow(velX, cmap=vel_cm, extent=ext)
plt.colorbar()
plt.grid()
@@ -121,22 +125,29 @@ def main():
plt.ylabel('Z')
# Plot Pressure
- plt.figure(5)
- plt.imshow(preZ, cmap=pre_cm, extent=ext)
+ f5 = plt.figure(5)
+ plt.imshow(preZ, cmap=pre_cm, extent=ext, interpolation='none')
plt.colorbar()
plt.grid()
plt.title('Log10 Pressure Cut, t=%.2f' % output.info["time"])
plt.xlabel('X')
plt.ylabel('Y')
- plt.figure(6)
- plt.imshow(preX, cmap=pre_cm, extent=ext)
+ f6 = plt.figure(6)
+ plt.imshow(preX, cmap=pre_cm, extent=ext, interpolation='none')
plt.colorbar()
plt.grid()
plt.title('Log10 Pressure Cut, t=%.2f' % output.info["time"])
plt.xlabel('Y')
plt.ylabel('Z')
+ #plt.close(f1)
+ #plt.close(f2)
+ # plt.close(f3)
+ # plt.close(f4)
+ #plt.close(f5)
+ #plt.close(f6)
+
plt.show()