Skip to content

Commit

Permalink
Update for PyGMT improvements
Browse files Browse the repository at this point in the history
Can improve default param setting once
GenericMappingTools/pygmt#411 is merged
  • Loading branch information
liamtoney committed Apr 27, 2020
1 parent a205189 commit a749313
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions rtm/plotting.py
Original file line number Diff line number Diff line change
Expand Up @@ -167,13 +167,10 @@ def plot_time_slice(S, processed_st, time_slice=None, label_stations=True,
# Assumes meters!
fig.grdcontour(dem, interval=cont_int, annotation=f'{annot_int}+u" m"')

session = pygmt.clib.Session()
session.create('')
with session.virtualfile_from_grid(slice) as grid_file:
pygmt.makecpt(cmap='viridis', series=[np.nanmin(slice.data),
np.nanmax(slice.data)])
session.call_module('grdview', f'{grid_file} -C -T+s -t{transp}')
session.destroy()
# Make heatmap of slice
pygmt.makecpt(cmap='viridis', series=[np.nanmin(slice.data),
np.nanmax(slice.data)])
fig.grdview(slice, cmap=True, T='+s', t=transp)

# Make colorbar
if S.UTM:
Expand Down

0 comments on commit a749313

Please sign in to comment.