Skip to content

Commit

Permalink
fix log-spectrogram plot, see #78
Browse files Browse the repository at this point in the history
  • Loading branch information
megies committed Sep 21, 2018
1 parent a0e9c9b commit e7c607b
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions obspyck/obspyck.py
Original file line number Diff line number Diff line change
Expand Up @@ -1463,10 +1463,14 @@ def drawAxes(self):
cmap=self.spectrogramColormap, axes=ax, zorder=-10)
textcolor = "red"
# adjust spectrogram start time offset, relative to reference time
x1, x2, y1, y2 = ax.images[0].get_extent()
ax.images[0].set_extent((
x1 + self.options.starttime_offset,
x2 + self.options.starttime_offset, y1, y2))
if log:
quadmesh_ = ax.collections[0]
quadmesh_._coordinates[:, :, 0] += self.options.starttime_offset
else:
x1, x2, y1, y2 = ax.images[0].get_extent()
ax.images[0].set_extent((
x1 + self.options.starttime_offset,
x2 + self.options.starttime_offset, y1, y2))
else:
# normalize with overall sensitivity and convert to nm/s
# if not explicitly deactivated on command line
Expand Down

0 comments on commit e7c607b

Please sign in to comment.