Skip to content

Commit

Permalink
Gallery example "Clipping grid values": Add annotations to frames (#2709
Browse files Browse the repository at this point in the history
)
  • Loading branch information
yvonnefroehlich authored Oct 7, 2023
1 parent 4d289b2 commit 18034f4
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions examples/gallery/images/grdclip.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,11 @@
grid = pygmt.datasets.load_earth_relief(resolution="03m", region=region)

# Plot original grid
fig.basemap(region=region, projection="M12c", frame=["f", "+toriginal grid"])
fig.basemap(
region=region,
projection="M12c",
frame=["WSne+toriginal grid", "xa5f1", "ya2f1"],
)
fig.grdimage(grid=grid, cmap="oleron")

# Shift plot origin of the second map by "width of the first map + 0.5 cm"
Expand All @@ -31,7 +35,11 @@
grid = pygmt.grdclip(grid, below=[0, -2000])

# Plot clipped grid
fig.basemap(region=region, projection="M12c", frame=["f", "+tclipped grid"])
fig.basemap(
region=region,
projection="M12c",
frame=["wSne+tclipped grid", "xa5f1", "ya2f1"],
)
fig.grdimage(grid=grid)
fig.colorbar(frame=["x+lElevation", "y+lm"], position="JMR+o0.5c/0c+w8c")

Expand Down

0 comments on commit 18034f4

Please sign in to comment.