tImprove plot appearance and content - sphere - GPU-based 3D discrete element method algorithm with optional fluid coupling
(HTM) git clone git://src.adamsgaard.dk/sphere
(DIR) Log
(DIR) Files
(DIR) Refs
(DIR) LICENSE
---
(DIR) commit 670fa039eb42c42ec33f71e61da7ebab328056b5
(DIR) parent 451d62b9147f55f551565c422a24c022860c492c
(HTM) Author: Anders Damsgaard <anders@adamsgaard.dk>
Date: Tue, 26 Nov 2019 20:47:45 +0100
Improve plot appearance and content
Diffstat:
M python/supraglacial-plots.py | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
---
(DIR) diff --git a/python/supraglacial-plots.py b/python/supraglacial-plots.py
t@@ -88,7 +88,6 @@ plt.savefig('supraglacial_flux.pdf')
'''
# time series
-fig = plt.figure(figsize=(8,12))
for dpdz in dpdz_values:
for slope_angle in slope_angle_values:
sim = sphere.sim("supraglacial-slope{}-dpdz{}".format(slope_angle, dpdz), fluid=True)
t@@ -119,6 +118,11 @@ for dpdz in dpdz_values:
displacement[it] = np.mean(sim.xyzsum[:,0])
flux[it] = np.trapz(xsum_space_avg/sim.time_current, dx=dz)
+ fig = plt.figure(figsize=(6,8))
+ fig.suptitle('slope = ' + str(slope_angle) + '$^\circ$, ' + \
+ '$dp/dz$ = -' + str(dpdz) + ' Pa/m',
+ horizontalalignment='left')
+
ax1 = plt.subplot(3,1,1)
plt.plot(timesteps, porosity, '-')
plt.ylabel('Porosity [-]')
t@@ -131,7 +135,7 @@ for dpdz in dpdz_values:
ax3 = plt.subplot(3,1,2)
plt.semilogy(timesteps, displacement, '-')
- plt.ylabel('Cumulative displacement [m]')
+ plt.ylabel('Avg. displacement [m]')
plt.setp(ax3.get_xticklabels(), visible=False)
ax1 = plt.subplot(3,1,3)
t@@ -139,6 +143,7 @@ for dpdz in dpdz_values:
plt.ylabel('Cumulative flux [m$^2$/s]')
plt.xlabel('Time [s]')
+ plt.tight_layout()
plt.savefig(sim.id() + '-timeseries.png')
plt.savefig(sim.id() + '-timeseries.pdf')
plt.clf()