Skip to content

Commit 125574e

Browse files
weiji14seisman
andcommitted
Refactor no_clip if-condition to be a little more clear
Double negatives are confusing Co-Authored-By: Dongdong Tian <[email protected]>
1 parent de74e3d commit 125574e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

pygmt/src/tilemap.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -142,9 +142,9 @@ def tilemap(
142142
raster = raster.rio.reproject(dst_crs="OGC:CRS84")
143143
raster.gmt.gtype = 1 # set to geographic type
144144

145-
# Only set region if no_clip is False, so that plot is clipped to exact
146-
# bounding box region
147-
if not kwargs.get("N"):
145+
# Only set region if no_clip is None or False, so that plot is clipped to
146+
# exact bounding box region
147+
if kwargs.get("N") in [None, False]:
148148
kwargs["R"] = "/".join(str(coordinate) for coordinate in region)
149149

150150
with GMTTempFile(suffix=".tif") as tmpfile:

0 commit comments

Comments
 (0)