Skip to content

Commit

Permalink
Fix issue 322
Browse files Browse the repository at this point in the history
  • Loading branch information
rubencalje committed Feb 8, 2024
1 parent 9cc59d3 commit 4bc5b85
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions nlmod/plot/plot.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,11 @@ def modelgrid(ds, ax=None, **kwargs):
_, ax = plt.subplots(figsize=(10, 10))
ax.axis("scaled")
modelgrid = modelgrid_from_ds(ds)
extent = None if ax.get_autoscale_on() else ax.axis()
modelgrid.plot(ax=ax, **kwargs)
if extent is not None:
ax.axis(extent)

return ax


Expand Down

0 comments on commit 4bc5b85

Please sign in to comment.