Skip to content

Commit

Permalink
Refactor no_clip if-condition to be a little more clear
Browse files Browse the repository at this point in the history
Double negatives are confusing

Co-Authored-By: Dongdong Tian <seisman.info@gmail.com>
  • Loading branch information
weiji14 and seisman committed Mar 23, 2023
1 parent de74e3d commit 125574e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pygmt/src/tilemap.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,9 +142,9 @@ def tilemap(
raster = raster.rio.reproject(dst_crs="OGC:CRS84")
raster.gmt.gtype = 1 # set to geographic type

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

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

0 comments on commit 125574e

Please sign in to comment.