[cig-commits] r19989 - short/3D/PyLith/benchmarks/trunk/dynamic/scecdynrup/tpv210-2d
brad at geodynamics.org
brad at geodynamics.org
Tue Apr 24 14:40:11 PDT 2012
Author: brad
Date: 2012-04-24 14:40:10 -0700 (Tue, 24 Apr 2012)
New Revision: 19989
Modified:
short/3D/PyLith/benchmarks/trunk/dynamic/scecdynrup/tpv210-2d/plot_sliprate.py
short/3D/PyLith/benchmarks/trunk/dynamic/scecdynrup/tpv210-2d/plot_stressslip.py
Log:
Added multipart figure labels.
Modified: short/3D/PyLith/benchmarks/trunk/dynamic/scecdynrup/tpv210-2d/plot_sliprate.py
===================================================================
--- short/3D/PyLith/benchmarks/trunk/dynamic/scecdynrup/tpv210-2d/plot_sliprate.py 2012-04-24 21:15:56 UTC (rev 19988)
+++ short/3D/PyLith/benchmarks/trunk/dynamic/scecdynrup/tpv210-2d/plot_sliprate.py 2012-04-24 21:40:10 UTC (rev 19989)
@@ -10,6 +10,7 @@
# PREREQUISITES: matplotlib, numpy
sim = "tpv13"
+showAB = True
# ----------------------------------------------------------------------
import tables
@@ -45,7 +46,9 @@
nrows = len(locs)
ncols = 2
+labelsAB = 'abcdefgh'
+
for icol in xrange(ncols):
simdirs = []
@@ -99,9 +102,9 @@
ax.set_xlabel("Time (s)")
ax.set_ylim((0, 16.0))
ax.set_ylabel("Slip Rate (m/s)")
- ax.set_title("%3.1f km Down Dip" % locs[irow],
- horizontalalignment="right",
- fontweight='bold')
+ if icol == 0:
+ ax.text(0, 17, "%3.1f km Down Dip" % locs[irow],
+ fontweight='bold')
if irow == 0:
ax.legend(loc="lower right",
@@ -116,6 +119,12 @@
ax.set_yticklabels([])
ax.set_ylabel("")
+ if showAB:
+ ilabel = icol*nrows + irow
+ ax.text(0.2, 14, "(%s)" % labelsAB[ilabel],
+ fontweight='bold')
+
+
pyplot.show()
pyplot.savefig("%s-2d_sliprate" % (sim))
Modified: short/3D/PyLith/benchmarks/trunk/dynamic/scecdynrup/tpv210-2d/plot_stressslip.py
===================================================================
--- short/3D/PyLith/benchmarks/trunk/dynamic/scecdynrup/tpv210-2d/plot_stressslip.py 2012-04-24 21:15:56 UTC (rev 19988)
+++ short/3D/PyLith/benchmarks/trunk/dynamic/scecdynrup/tpv210-2d/plot_stressslip.py 2012-04-24 21:40:10 UTC (rev 19989)
@@ -12,6 +12,7 @@
sim = "tpv13"
cell = "tri3"
dx = 100
+showAB = True
infoFilename = "output/%s_%s_%03dm-fault_info.h5" % (sim,cell,dx)
dataFilename = "output/%s_%s_%03dm-fault.h5" % (sim,cell,dx)
@@ -43,7 +44,7 @@
order = numpy.argsort(dipDist)
figure = matplotlibext.Figure()
-figure.open(3.0, 5.25, margins=[[0.45, 0, 0.15], [0.35, 0.55, 0.1]], dpi=150)
+figure.open(3.0, 5.25, margins=[[0.45, 0, 0.15], [0.35, 0.55, 0.2]], dpi=150)
ax = figure.axes(2.0, 1, 1.0, 1)
ax.plot(traction[order,0], dipDist[order],
@@ -74,6 +75,9 @@
'$T_\mathit{failure}$',
'$T_\mathit{sliding}$',
), loc="upper left")
+if showAB:
+ ax.text(-150, -0.5, "(a)", fontweight='bold')
+
ax = figure.axes(2.0, 1, 2.0, 1)
itime = slip.shape[0]-1
@@ -84,6 +88,8 @@
ax.set_xlabel("Slip (m)")
ax.set_ylim((15.0, 0.0))
ax.set_ylabel("Dist. Down Dip (km)")
+if showAB:
+ ax.text(0, -0.5, "(b)", fontweight='bold')
pyplot.show()
pyplot.savefig("%s-2d_%s_%03dm_stressslip" % (sim,cell,dx))
More information about the CIG-COMMITS
mailing list