Gmtinfo - extending the region

I’d like to use gmt info -I...+e|r|R to extend the region of a data table so that the data isn’t plotted right up to the edge of the map. I can’t seem to make +e|r|R have any effect and am a bit confused by the docs. I end up having to use awk to manually extend the bounds. I don’t think I understand the difference between +r and +R, and +e doesn’t work like I expect. Am I using these options incorrectly?

cat << EOD >> data.gmt
-125,37.6
-111.1,49.2
EOD
# Target extended region: -R-125.25/-110.75/37.25/49.75

# exact extent
gmt info data.gmt -Ie
# -R-125/-111.1/37.6/49.2 <- OK

# round to nearest 0.25
gmt info data.gmt -I0.25/0.25
# -R-125/-111/37.5/49.25 <- OK

# +r|R|e options
gmt info data.gmt -I0.25/0.25+r0.25/0.25  # is +r0.25/0.25 redundant here?
gmt info data.gmt -I0.25/0.25+R0.25/0.25
gmt info data.gmt -I0.25/0.25+e0.25/0.25
# all return -R-125/-111/37.5/49.25

Thanks,
Jason

I’m using GMT v6.4.0 installed on macOS via conda.

There is a bug in the -I parsing code. I will fix it in a few hours. Thanks for pointing it out.

Pull request submitted for review - you could try it if you have time.

Bug fixed approved and merged into master.

1 Like