Skip to content

Commit

Permalink
Include station location in annotation, if present
Browse files Browse the repository at this point in the history
  • Loading branch information
rmodrak committed Aug 27, 2023
1 parent 7aa099a commit 5ff1a72
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
9 changes: 7 additions & 2 deletions mtuq/graphics/annotations.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,13 @@ def station_label_writer(ax, station, origin, units='km'):
station.latitude,
station.longitude)

# display station name
label = '.'.join([station.network,station.station])
# construct station label
if len(station.location) > 1:
label = station.network + '.' + station.station + '.' + station.location
else:
label = station.network + '.' + station.station

# display station label
pyplot.text(0.2,0.50, label, fontsize=11, transform=ax.transAxes)

# display distance
Expand Down
2 changes: 1 addition & 1 deletion mtuq/graphics/waveforms.py
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,7 @@ def plot_data_greens2(filename,
def _initialize(nrows=None, ncolumns=None, column_width_ratios=None,
header=None, height=None, width=None, margin_top=0.25, margin_bottom=0.25,
margin_left=0.25, margin_right=0.25, header_height=1.5,
station_labels=True, station_label_width=0.4):
station_labels=True, station_label_width=0.5):

if header:
height += header_height
Expand Down

0 comments on commit 5ff1a72

Please sign in to comment.