Skip to content

Commit

Permalink
debug plotrt
Browse files Browse the repository at this point in the history
  • Loading branch information
xumi1993 committed Nov 5, 2024
1 parent 4511ad0 commit 7525d42
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 20 deletions.
19 changes: 9 additions & 10 deletions seispy/plotR.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,16 +109,15 @@ def plot(self, out_path=None, outformat='g', show=False):
"""
self.plot_waves()
self.set_fig()
if outformat is None and not show:
return
elif outformat == 'g':
self.fig.savefig(join(out_path, self.stadata.staname+'_{}_{}order_{:.1f}.png'.format(
self.stadata.comp, self.key, self.stadata.f0[0])),
dpi=400, bbox_inches='tight')
elif outformat == 'f':
self.fig.savefig(join(out_path, self.stadata.staname+'_{}_{}order_{:.1f}.pdf'.format(
self.stadata.comp, self.key, self.stadata.f0[0])),
format='pdf', bbox_inches='tight')
if out_path is not None:
if outformat == 'g':
self.fig.savefig(join(out_path, self.stadata.staname+'_{}_{}order_{:.1f}.png'.format(
self.stadata.comp, self.key, self.stadata.f0[0])),
dpi=400, bbox_inches='tight')
elif outformat == 'f':
self.fig.savefig(join(out_path, self.stadata.staname+'_{}_{}order_{:.1f}.pdf'.format(
self.stadata.comp, self.key, self.stadata.f0[0])),
format='pdf', bbox_inches='tight')
if show:
plt.show()

Expand Down
19 changes: 9 additions & 10 deletions seispy/plotRT.py
Original file line number Diff line number Diff line change
Expand Up @@ -148,16 +148,15 @@ def plot(self, out_path=None, outformat='g', show=False):
"""
self.plot_waves()
self.set_fig()
if outformat is None and not show:
return
elif outformat == 'g':
self.fig.savefig(join(out_path, self.stadata.staname+'_{}T_{}order_{:.1f}.png'.format(
self.stadata.comp, self.key, self.stadata.f0[0])),
dpi=400, bbox_inches='tight')
elif outformat == 'f':
self.fig.savefig(join(out_path, self.stadata.staname+'_{}T_{}order_{:.1f}.pdf'.format(
self.stadata.comp, self.key, self.stadata.f0[0])),
format='pdf', bbox_inches='tight')
if out_path is not None:
if outformat == 'g':
self.fig.savefig(join(out_path, self.stadata.staname+'_{}T_{}order_{:.1f}.png'.format(
self.stadata.comp, self.key, self.stadata.f0[0])),
dpi=400, bbox_inches='tight')
elif outformat == 'f':
self.fig.savefig(join(out_path, self.stadata.staname+'_{}T_{}order_{:.1f}.pdf'.format(
self.stadata.comp, self.key, self.stadata.f0[0])),
format='pdf', bbox_inches='tight')
if show:
plt.show()

Expand Down

0 comments on commit 7525d42

Please sign in to comment.