Enabled terminal based plotting.
This commit is contained in:
parent
df2d5929d3
commit
f1f6082cd8
@ -980,6 +980,7 @@ def checkZ4S(X, pick, zfac, checkwin, iplot, fig=None):
|
|||||||
: type: int
|
: type: int
|
||||||
'''
|
'''
|
||||||
|
|
||||||
|
plt_flag = 0
|
||||||
try:
|
try:
|
||||||
iplot = int(iplot)
|
iplot = int(iplot)
|
||||||
except:
|
except:
|
||||||
@ -1067,12 +1068,14 @@ def checkZ4S(X, pick, zfac, checkwin, iplot, fig=None):
|
|||||||
if i == 0:
|
if i == 0:
|
||||||
if fig == None or fig == 'None':
|
if fig == None or fig == 'None':
|
||||||
fig = plt.figure() # self.iplot) ### WHY? MP MP
|
fig = plt.figure() # self.iplot) ### WHY? MP MP
|
||||||
|
plt_flag = 1
|
||||||
ax1 = fig.add_subplot(3, 1, i + 1)
|
ax1 = fig.add_subplot(3, 1, i + 1)
|
||||||
ax = ax1
|
ax = ax1
|
||||||
ax.set_title('CheckZ4S, Station %s' % zdat[0].stats.station)
|
ax.set_title('CheckZ4S, Station %s' % zdat[0].stats.station)
|
||||||
else:
|
else:
|
||||||
if fig == None or fig == 'None':
|
if fig == None or fig == 'None':
|
||||||
fig = plt.figure() # self.iplot) ### WHY? MP MP
|
fig = plt.figure() # self.iplot) ### WHY? MP MP
|
||||||
|
plt_flag = 1
|
||||||
ax = fig.add_subplot(3, 1, i + 1, sharex=ax1)
|
ax = fig.add_subplot(3, 1, i + 1, sharex=ax1)
|
||||||
ax.plot(t, abs(trace.data), color='b', label='abs')
|
ax.plot(t, abs(trace.data), color='b', label='abs')
|
||||||
ax.plot(t, trace.data, color='k')
|
ax.plot(t, trace.data, color='k')
|
||||||
@ -1084,6 +1087,10 @@ def checkZ4S(X, pick, zfac, checkwin, iplot, fig=None):
|
|||||||
lw=0)
|
lw=0)
|
||||||
ax.legend()
|
ax.legend()
|
||||||
ax.set_xlabel('Time [s] since %s' % zdat[0].stats.starttime)
|
ax.set_xlabel('Time [s] since %s' % zdat[0].stats.starttime)
|
||||||
|
if plt_flag == 1:
|
||||||
|
fig.show()
|
||||||
|
raw_input()
|
||||||
|
plt.close(fig)
|
||||||
return returnflag
|
return returnflag
|
||||||
|
|
||||||
def getQualityfromUncertainty(uncertainty, Errors):
|
def getQualityfromUncertainty(uncertainty, Errors):
|
||||||
|
Loading…
Reference in New Issue
Block a user