[change] enabled tight layout for tune autopicker plots
This commit is contained in:
parent
ff891cacdc
commit
ec8d471ce1
@ -477,6 +477,7 @@ def autopickstation(wfstream, pickparam, verbose=False,
|
|||||||
else:
|
else:
|
||||||
fig = None
|
fig = None
|
||||||
linecolor = 'k'
|
linecolor = 'k'
|
||||||
|
fig._tight = True
|
||||||
epickP, lpickP, Perror = earllatepicker(z_copy, nfacP, tsnrz,
|
epickP, lpickP, Perror = earllatepicker(z_copy, nfacP, tsnrz,
|
||||||
mpickP, iplot, fig=fig,
|
mpickP, iplot, fig=fig,
|
||||||
linecolor=linecolor)
|
linecolor=linecolor)
|
||||||
@ -512,6 +513,7 @@ def autopickstation(wfstream, pickparam, verbose=False,
|
|||||||
linecolor = fig_dict['plot_style']['linecolor']['rgba_mpl']
|
linecolor = fig_dict['plot_style']['linecolor']['rgba_mpl']
|
||||||
else:
|
else:
|
||||||
fig = None
|
fig = None
|
||||||
|
fig._tight = True
|
||||||
FM = fmpicker(zdat, z_copy, fmpickwin, mpickP, iplot, fig, linecolor)
|
FM = fmpicker(zdat, z_copy, fmpickwin, mpickP, iplot, fig, linecolor)
|
||||||
else:
|
else:
|
||||||
FM = fmpicker(zdat, z_copy, fmpickwin, mpickP, iplot)
|
FM = fmpicker(zdat, z_copy, fmpickwin, mpickP, iplot)
|
||||||
@ -725,6 +727,7 @@ def autopickstation(wfstream, pickparam, verbose=False,
|
|||||||
else:
|
else:
|
||||||
fig = None
|
fig = None
|
||||||
linecolor = 'k'
|
linecolor = 'k'
|
||||||
|
fig._tight = True
|
||||||
refSpick = PragPicker(arhcf2, tsnrh, pickwinS, iplot, ausS,
|
refSpick = PragPicker(arhcf2, tsnrh, pickwinS, iplot, ausS,
|
||||||
tsmoothS, aicarhpick.getpick(), fig, linecolor)
|
tsmoothS, aicarhpick.getpick(), fig, linecolor)
|
||||||
mpickS = refSpick.getpick()
|
mpickS = refSpick.getpick()
|
||||||
@ -740,6 +743,7 @@ def autopickstation(wfstream, pickparam, verbose=False,
|
|||||||
else:
|
else:
|
||||||
fig = None
|
fig = None
|
||||||
linecolor = 'k'
|
linecolor = 'k'
|
||||||
|
fig._tight = True
|
||||||
epickS1, lpickS1, Serror1 = earllatepicker(h_copy, nfacS,
|
epickS1, lpickS1, Serror1 = earllatepicker(h_copy, nfacS,
|
||||||
tsnrh,
|
tsnrh,
|
||||||
mpickS, iplot,
|
mpickS, iplot,
|
||||||
@ -758,6 +762,7 @@ def autopickstation(wfstream, pickparam, verbose=False,
|
|||||||
else:
|
else:
|
||||||
fig = None
|
fig = None
|
||||||
linecolor = ''
|
linecolor = ''
|
||||||
|
fig._tight = True
|
||||||
epickS2, lpickS2, Serror2 = earllatepicker(h_copy, nfacS,
|
epickS2, lpickS2, Serror2 = earllatepicker(h_copy, nfacS,
|
||||||
tsnrh,
|
tsnrh,
|
||||||
mpickS, iplot,
|
mpickS, iplot,
|
||||||
@ -875,6 +880,7 @@ def autopickstation(wfstream, pickparam, verbose=False,
|
|||||||
else:
|
else:
|
||||||
fig = fig_dict['mainFig']
|
fig = fig_dict['mainFig']
|
||||||
linecolor = fig_dict['plot_style']['linecolor']['rgba_mpl']
|
linecolor = fig_dict['plot_style']['linecolor']['rgba_mpl']
|
||||||
|
fig._tight = True
|
||||||
ax1 = fig.add_subplot(311)
|
ax1 = fig.add_subplot(311)
|
||||||
tdata = np.arange(0, zdat[0].stats.npts / tr_filt.stats.sampling_rate,
|
tdata = np.arange(0, zdat[0].stats.npts / tr_filt.stats.sampling_rate,
|
||||||
tr_filt.stats.delta)
|
tr_filt.stats.delta)
|
||||||
|
@ -309,6 +309,7 @@ class AICPicker(AutoPicker):
|
|||||||
plt_flag = 1
|
plt_flag = 1
|
||||||
else:
|
else:
|
||||||
fig = self.fig
|
fig = self.fig
|
||||||
|
fig._tight = True
|
||||||
ax1 = fig.add_subplot(211)
|
ax1 = fig.add_subplot(211)
|
||||||
x = self.Data[0].data
|
x = self.Data[0].data
|
||||||
if len(self.Tcf) > len(self.Data[0].data): # why? LK
|
if len(self.Tcf) > len(self.Data[0].data): # why? LK
|
||||||
@ -478,6 +479,7 @@ class PragPicker(AutoPicker):
|
|||||||
plt_flag = 1
|
plt_flag = 1
|
||||||
else:
|
else:
|
||||||
fig = self.fig
|
fig = self.fig
|
||||||
|
fig._tight = True
|
||||||
ax = fig.add_subplot(111)
|
ax = fig.add_subplot(111)
|
||||||
ax.plot(Tcfpick, cfipick, color=self._linecolor, linewidth=0.7, label='CF')
|
ax.plot(Tcfpick, cfipick, color=self._linecolor, linewidth=0.7, label='CF')
|
||||||
ax.plot(Tcfpick, cfsmoothipick, 'r', label='Smoothed CF')
|
ax.plot(Tcfpick, cfsmoothipick, 'r', label='Smoothed CF')
|
||||||
|
@ -791,6 +791,7 @@ def checksignallength(X, pick, TSNR, minsiglength, nfac, minpercent, iplot=0, fi
|
|||||||
fig = plt.figure() # iplot)
|
fig = plt.figure() # iplot)
|
||||||
plt_flag = 1
|
plt_flag = 1
|
||||||
ax = fig.add_subplot(111)
|
ax = fig.add_subplot(111)
|
||||||
|
fig._tight = True
|
||||||
ax.plot(t, rms, color=linecolor, linewidth=0.7, label='RMS Data')
|
ax.plot(t, rms, color=linecolor, linewidth=0.7, label='RMS Data')
|
||||||
ax.axvspan(t[inoise[0]], t[inoise[-1]], color='y', alpha=0.2, lw=0, label='Noise Window')
|
ax.axvspan(t[inoise[0]], t[inoise[-1]], color='y', alpha=0.2, lw=0, label='Noise Window')
|
||||||
ax.axvspan(t[isignal[0]], t[isignal[-1]], color='b', alpha=0.2, lw=0, label='Signal Window')
|
ax.axvspan(t[isignal[0]], t[isignal[-1]], color='b', alpha=0.2, lw=0, label='Signal Window')
|
||||||
@ -1114,6 +1115,7 @@ def checkZ4S(X, pick, zfac, checkwin, iplot, fig=None, linecolor='k'):
|
|||||||
fig = plt.figure() # self.iplot) ### WHY? MP MP
|
fig = plt.figure() # self.iplot) ### WHY? MP MP
|
||||||
plt_flag = 1
|
plt_flag = 1
|
||||||
ax = fig.add_subplot(3, 1, i + 1, sharex=ax1)
|
ax = fig.add_subplot(3, 1, i + 1, sharex=ax1)
|
||||||
|
fig._tight = True
|
||||||
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=linecolor, linewidth=0.7)
|
ax.plot(t, trace.data, color=linecolor, linewidth=0.7)
|
||||||
name = str(trace.stats.channel) + ': {}'.format(rms)
|
name = str(trace.stats.channel) + ': {}'.format(rms)
|
||||||
|
Loading…
Reference in New Issue
Block a user