Introduction
Introduction Statistics Contact Development Disclaimer Help
timproved color bar range - sphere - GPU-based 3D discrete element method algor…
git clone git://src.adamsgaard.dk/sphere
Log
Files
Refs
LICENSE
---
commit 8922ceafe8a1b11f8d7b8cea01a650a49337a5f9
parent 2605a206bfbb6c3bfff6a4bb30c0a5ba2b0ebce5
Author: Anders Damsgaard <[email protected]>
Date: Fri, 30 Jan 2015 11:41:05 +0100
improved color bar range
Diffstat:
M python/sphere.py | 7 +++++++
1 file changed, 7 insertions(+), 0 deletions(-)
---
diff --git a/python/sphere.py b/python/sphere.py
t@@ -6091,6 +6091,8 @@ class sim:
raise Exception('Porosities can only be visualized in wet ' +
'simulations')
+ wall0_iz = int(sb.w_x[0]/(sb.L[2]/sb.num[2]))
+
# cell midpoint cell positions
zpos_c = numpy.zeros(sb.num[2])
dz = sb.L[2]/sb.num[2]
t@@ -6112,15 +6114,20 @@ class sim:
ax = plt.subplot(1,1,1)
+ poros_max = numpy.max(poros[0:wall0_iz-1,1:])
+ poros_min = numpy.min(poros)
+
if sb.wmode[0] == 3:
x = t
else:
x = shear_strain
im1 = ax.pcolormesh(
x, zpos_c, poros,
+ cmap=matplotlib.cm.get_cmap('Blues_r'),
#cmap=matplotlib.cm.get_cmap('bwr'),
#cmap=matplotlib.cm.get_cmap('coolwarm'),
#vmin=-p_ext, vmax=p_ext,
+ vmin=poros_min, vmax=poros_max,
rasterized=True)
ax.set_xlim([0, numpy.max(x)])
if sb.w_x[0] < sb.L[2]:
You are viewing proxied material from mx1.adamsgaard.dk. The copyright of proxied material belongs to its original authors. Any comments or complaints in relation to proxied material should be directed to the original authors of the content concerned. Please see the disclaimer for more details.