From f1f6082cd860a1612b8a1885ed014e604025605f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludger=20K=C3=BCperkoch?= Date: Fri, 11 Aug 2017 17:33:41 +0200 Subject: [PATCH] Enabled terminal based plotting. --- pylot/core/pick/utils.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/pylot/core/pick/utils.py b/pylot/core/pick/utils.py index 1f73b22f..fad3d04f 100644 --- a/pylot/core/pick/utils.py +++ b/pylot/core/pick/utils.py @@ -980,6 +980,7 @@ def checkZ4S(X, pick, zfac, checkwin, iplot, fig=None): : type: int ''' + plt_flag = 0 try: iplot = int(iplot) except: @@ -1067,12 +1068,14 @@ def checkZ4S(X, pick, zfac, checkwin, iplot, fig=None): if i == 0: if fig == None or fig == 'None': fig = plt.figure() # self.iplot) ### WHY? MP MP + plt_flag = 1 ax1 = fig.add_subplot(3, 1, i + 1) ax = ax1 ax.set_title('CheckZ4S, Station %s' % zdat[0].stats.station) else: if fig == None or fig == 'None': fig = plt.figure() # self.iplot) ### WHY? MP MP + plt_flag = 1 ax = fig.add_subplot(3, 1, i + 1, sharex=ax1) ax.plot(t, abs(trace.data), color='b', label='abs') ax.plot(t, trace.data, color='k') @@ -1084,6 +1087,10 @@ def checkZ4S(X, pick, zfac, checkwin, iplot, fig=None): lw=0) ax.legend() ax.set_xlabel('Time [s] since %s' % zdat[0].stats.starttime) + if plt_flag == 1: + fig.show() + raw_input() + plt.close(fig) return returnflag def getQualityfromUncertainty(uncertainty, Errors):