[change] enabled tight layout for tune autopicker plots

This commit is contained in:
Darius Arnold 2017-09-15 14:11:28 +02:00
parent ff891cacdc
commit ec8d471ce1
3 changed files with 10 additions and 0 deletions

View File

@ -477,6 +477,7 @@ def autopickstation(wfstream, pickparam, verbose=False,
else:
fig = None
linecolor = 'k'
fig._tight = True
epickP, lpickP, Perror = earllatepicker(z_copy, nfacP, tsnrz,
mpickP, iplot, fig=fig,
linecolor=linecolor)
@ -512,6 +513,7 @@ def autopickstation(wfstream, pickparam, verbose=False,
linecolor = fig_dict['plot_style']['linecolor']['rgba_mpl']
else:
fig = None
fig._tight = True
FM = fmpicker(zdat, z_copy, fmpickwin, mpickP, iplot, fig, linecolor)
else:
FM = fmpicker(zdat, z_copy, fmpickwin, mpickP, iplot)
@ -725,6 +727,7 @@ def autopickstation(wfstream, pickparam, verbose=False,
else:
fig = None
linecolor = 'k'
fig._tight = True
refSpick = PragPicker(arhcf2, tsnrh, pickwinS, iplot, ausS,
tsmoothS, aicarhpick.getpick(), fig, linecolor)
mpickS = refSpick.getpick()
@ -740,6 +743,7 @@ def autopickstation(wfstream, pickparam, verbose=False,
else:
fig = None
linecolor = 'k'
fig._tight = True
epickS1, lpickS1, Serror1 = earllatepicker(h_copy, nfacS,
tsnrh,
mpickS, iplot,
@ -758,6 +762,7 @@ def autopickstation(wfstream, pickparam, verbose=False,
else:
fig = None
linecolor = ''
fig._tight = True
epickS2, lpickS2, Serror2 = earllatepicker(h_copy, nfacS,
tsnrh,
mpickS, iplot,
@ -875,6 +880,7 @@ def autopickstation(wfstream, pickparam, verbose=False,
else:
fig = fig_dict['mainFig']
linecolor = fig_dict['plot_style']['linecolor']['rgba_mpl']
fig._tight = True
ax1 = fig.add_subplot(311)
tdata = np.arange(0, zdat[0].stats.npts / tr_filt.stats.sampling_rate,
tr_filt.stats.delta)

View File

@ -309,6 +309,7 @@ class AICPicker(AutoPicker):
plt_flag = 1
else:
fig = self.fig
fig._tight = True
ax1 = fig.add_subplot(211)
x = self.Data[0].data
if len(self.Tcf) > len(self.Data[0].data): # why? LK
@ -478,6 +479,7 @@ class PragPicker(AutoPicker):
plt_flag = 1
else:
fig = self.fig
fig._tight = True
ax = fig.add_subplot(111)
ax.plot(Tcfpick, cfipick, color=self._linecolor, linewidth=0.7, label='CF')
ax.plot(Tcfpick, cfsmoothipick, 'r', label='Smoothed CF')

View File

@ -791,6 +791,7 @@ def checksignallength(X, pick, TSNR, minsiglength, nfac, minpercent, iplot=0, fi
fig = plt.figure() # iplot)
plt_flag = 1
ax = fig.add_subplot(111)
fig._tight = True
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[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
plt_flag = 1
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, trace.data, color=linecolor, linewidth=0.7)
name = str(trace.stats.channel) + ': {}'.format(rms)