Skip to content

Commit

Permalink
Add default bounds to land plotitem
Browse files Browse the repository at this point in the history
  • Loading branch information
mandli committed Sep 20, 2024
1 parent 90a91a9 commit 5c65e22
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/python/geoclaw/surge/plot.py
Original file line number Diff line number Diff line change
Expand Up @@ -428,17 +428,16 @@ def add_pressure(plotaxes, bounds=None, plot_type='pcolor', shrink=1.0):
pass


def add_land(plotaxes, plot_type='pcolor', bounds=None):
def add_land(plotaxes, plot_type='pcolor', bounds=[0, 50]):
"""Add plotitem for land"""

if plot_type == 'pcolor':
plotitem = plotaxes.new_plotitem(name='land', plot_type='2d_pcolor')
plotitem.show = True
plotitem.plot_var = geoplot.land
plotitem.pcolor_cmap = land_cmap
if bounds is not None:
plotitem.pcolor_cmin = bounds[0]
plotitem.pcolor_cmax = bounds[1]
plotitem.pcolor_cmin = bounds[0]
plotitem.pcolor_cmax = bounds[1]
plotitem.add_colorbar = False
plotitem.amr_celledges_show = [0] * 10
plotitem.amr_patchedges_show = [1, 1, 1, 1, 1, 0, 0]
Expand Down

0 comments on commit 5c65e22

Please sign in to comment.