Introduction
Introduction Statistics Contact Development Disclaimer Help
tupdate plots - sphere - GPU-based 3D discrete element method algorithm with op…
git clone git://src.adamsgaard.dk/sphere
Log
Files
Refs
LICENSE
---
commit 47859ce34c1917a9b4a2f277fd750f9086401e60
parent e5de47d2e2884179b7956ee59e5b26d4ccf9ebd3
Author: Anders Damsgaard <[email protected]>
Date: Tue, 16 Jun 2015 09:09:48 +0200
update plots
Diffstat:
M python/halfshear-darcy-creep-dynam… | 11 +++++++----
M python/halfshear-darcy-strength-di… | 34 ++++++++++++++++-----------…
M python/halfshear-darcy-strength-di… | 34 ++++++++++++++++-----------…
3 files changed, 43 insertions(+), 36 deletions(-)
---
diff --git a/python/halfshear-darcy-creep-dynamics.py b/python/halfshear-darcy-…
t@@ -162,9 +162,11 @@ for step in steps:
scalingfactor = 1./t_DEM_to_t_real / (24.*3600.)
t_scaled = t*scalingfactor
-# Normal stress plot
fig = plt.figure(figsize=[3.5, 3.5])
+plt.figtext(0.05, 0.95, 'A', horizontalalignment='left', weight='bold')
+plt.figtext(0.05, 0.35, 'B', horizontalalignment='left', weight='bold')
+
# ax1 = plt.subplot(1, 1, 1)
ax1 = plt.subplot2grid((2, 3), (0, 0), colspan=3)
t@@ -187,10 +189,10 @@ ax1.set_ylabel('Effective normal stress $N$ [kPa]')
ax2 = ax1.twinx()
lns1 = ax2.semilogy(t_scaled, numpy.abs(vel_avg)*timescaling, '-b',
- label='$\\bar{\\boldsymbol{v}}_x$',
+ label='$|\\bar{\\boldsymbol{v}}_x|$',
clip_on=False)
lns2 = ax2.semilogy(t_scaled, numpy.abs(angvel_avg)*timescaling, '-r',
- label='$\\bar{\\boldsymbol{\\omega}}_y$',
+ label='$|\\bar{\\boldsymbol{\\omega}}_y|$',
clip_on=False)
ax2.set_ylabel('Linear $\\bar{\\boldsymbol{v}}_x$ [m/s] or '
+ 'angular velocity $\\bar{\\boldsymbol{\\omega}}_y$ [rad/s]')
t@@ -207,7 +209,8 @@ ax1.xaxis.set_ticks_position('bottom')
lns = lns0+lns1+lns2
labs = [l.get_label() for l in lns]
-ax2.legend(lns, labs, loc='upper center', ncol=3, bbox_to_anchor=(0.5, 1.12),
+# bbox_to_anchor=(0.5, 1.12) for legend centered above box
+ax2.legend(lns, labs, loc='upper center', ncol=3, bbox_to_anchor=(0.5, 1.25),
fancybox=True, framealpha=1.0)
ax1.set_xlim([numpy.min(t_scaled), numpy.max(t_scaled)])
diff --git a/python/halfshear-darcy-strength-dilation-rate.py b/python/halfshea…
t@@ -44,34 +44,34 @@ velfac = 1.0
# original input array
def smooth(x, window_len=10, window='hanning'):
"""smooth the data using a window with requested size.
-
+
This method is based on the convolution of a scaled window with the signal.
- The signal is prepared by introducing reflected copies of the signal
+ The signal is prepared by introducing reflected copies of the signal
(with the window size) in both ends so that transient parts are minimized
in the begining and end part of the output signal.
-
+
input:
- x: the input signal
+ x: the input signal
window_len: the dimension of the smoothing window
window: the type of window from 'flat', 'hanning', 'hamming', 'bartlet…
flat window will produce a moving average smoothing.
output:
the smoothed signal
-
+
example:
- import numpy as np
+ import numpy as np
t = np.linspace(-2,2,0.1)
x = np.sin(t)+np.random.randn(len(t))*0.1
y = smooth(x)
-
- see also:
-
+
+ see also:
+
numpy.hanning, numpy.hamming, numpy.bartlett, numpy.blackman, numpy.convol…
scipy.signal.lfilter
-
- TODO: the window parameter could be the window itself if an array instead …
+
+ TODO: the window parameter could be the window itself if an array instead …
"""
if x.ndim != 1:
t@@ -250,17 +250,19 @@ for sigma0 in sigma0_list:
label=label, linewidth=1)
if pressures:
- #ax3.plot(shear_strain[c], p_max[c], '-', color=color[c], alpha=0.…
+ ax3.plot(shear_strain[c], p_max[c], ':', color=color[c], alpha=0.5,
+ linewidth=0.5)
ax3.plot(shear_strain[c], p_mean[c], '-', color=color[c], \
label=label, linewidth=1)
- #ax3.plot(shear_strain[c], p_min[c], '-', color=color[c], alpha=0.…
+ ax3.plot(shear_strain[c], p_min[c], ':', color=color[c], alpha=0.5,
+ linewidth=0.5)
- ax3.fill_between(shear_strain[c], p_min[c], p_max[c],
- where=p_min[c]<=p_max[c], facecolor=color[c], edgecolor='N…
- interpolate=True, alpha=0.3)
+ #ax3.fill_between(shear_strain[c], p_min[c], p_max[c],
+ # where=p_min[c]<=p_max[c], facecolor=color[c], edgecolor='…
+ # interpolate=True, alpha=0.3)
#ax4.plot(shear_strain[c][1:], f_n_mean[c][1:], '-' + color[c],
#label='$c$ = %.2f' % (cvals[c-1]), linewidth=2)
diff --git a/python/halfshear-darcy-strength-dilation.py b/python/halfshear-dar…
t@@ -43,34 +43,34 @@ velfac = 1.0
def smooth(x, window_len=10, window='hanning'):
#def smooth(x, window_len=10, window='flat'):
"""smooth the data using a window with requested size.
-
+
This method is based on the convolution of a scaled window with the signal.
- The signal is prepared by introducing reflected copies of the signal
+ The signal is prepared by introducing reflected copies of the signal
(with the window size) in both ends so that transient parts are minimized
in the begining and end part of the output signal.
-
+
input:
- x: the input signal
+ x: the input signal
window_len: the dimension of the smoothing window
window: the type of window from 'flat', 'hanning', 'hamming', 'bartlet…
flat window will produce a moving average smoothing.
output:
the smoothed signal
-
+
example:
- import numpy as np
+ import numpy as np
t = np.linspace(-2,2,0.1)
x = np.sin(t)+np.random.randn(len(t))*0.1
y = smooth(x)
-
- see also:
-
+
+ see also:
+
numpy.hanning, numpy.hamming, numpy.bartlett, numpy.blackman, numpy.convol…
scipy.signal.lfilter
-
- TODO: the window parameter could be the window itself if an array instead …
+
+ TODO: the window parameter could be the window itself if an array instead …
"""
if x.ndim != 1:
t@@ -248,17 +248,19 @@ for sigma0 in sigma0_list:
label=label, linewidth=1)
if fluid and pressures:
- #ax3.plot(shear_strain[c], p_max[c], '-', color=color[c], alpha=0.…
+ ax3.plot(shear_strain[c], p_max[c], ':', color=color[c], alpha=0.5,
+ linewidth=0.5)
ax3.plot(shear_strain[c], p_mean[c], '-', color=color[c], \
label=label, linewidth=1)
- #ax3.plot(shear_strain[c], p_min[c], '-', color=color[c], alpha=0.…
+ ax3.plot(shear_strain[c], p_min[c], ':', color=color[c], alpha=0.5,
+ linewidth=0.5)
- ax3.fill_between(shear_strain[c], p_min[c], p_max[c],
- where=p_min[c]<=p_max[c], facecolor=color[c], edgecolor='N…
- interpolate=True, alpha=0.3)
+ #ax3.fill_between(shear_strain[c], p_min[c], p_max[c],
+ # where=p_min[c]<=p_max[c], facecolor=color[c], edgecolor='…
+ # interpolate=True, alpha=0.3)
#ax4.plot(shear_strain[c][1:], f_n_mean[c][1:], '-' + color[c],
#label='$c$ = %.2f' % (cvals[c-1]), linewidth=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.