gmt
gmt copied to clipboard
Inconsistent frame behavior for single-figure and subplot mode
Description of the problem
The issues was first reported by @ZMAlt in https://github.com/gmt-china/GMT_docs/issues/691#issuecomment-896450203.
Using -BWSEN
without -Baf
, the basemap doesn't show annotations and ticks for a single plot, but shows them in subplot mode. Not sure if this is a bug.
Full script that generated the error
Single figure:
gmt begin test1 png
gmt basemap -R0/4/0/4 -JX4c -BWSEN
gmt end show
Same command in subplot mode:
gmt begin test1 png
gmt subplot begin 1x7 -Fs4c/4c -M5p/10p
gmt basemap -R0/4/0/4 -JX4c -BWSEN
gmt subplot end
gmt end show
maybe related ? issue 5476
It is more of a "feature". In subplot mode the subplot module makes some decisions if there is no -S or -B and it bases that off the defaults for MAP_FRAME_AXES for modern theme. So if you did not add -BWESN you actually get -BWrSt as the default. Adding -BWESN simply propagates to include N and E as well. In subplot, the way to override the automatic decisions and get just a rectangle is to use -B0.
It is more of a "feature". In subplot mode the subplot module makes some decisions if there is no -S or -B and it bases that off the defaults for MAP_FRAME_AXES for modern theme. So if you did not add -BWESN you actually get -BWrSt as the default. Adding -BWESN simply propagates to include N and E as well. In subplot, the way to override the automatic decisions and get just a rectangle is to use -B0.
So, is -B0 just a shortcut for -Brltb? Is this worth documenting?