gmt icon indicating copy to clipboard operation
gmt copied to clipboard

Inconsistent frame behavior for single-figure and subplot mode

Open seisman opened this issue 3 years ago • 3 comments

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

image

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

image

seisman avatar Aug 18 '21 14:08 seisman

maybe related ? issue 5476

gd-a avatar Aug 27 '21 14:08 gd-a

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.

PaulWessel avatar Aug 27 '21 20:08 PaulWessel

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?

maxrjones avatar Sep 23 '21 22:09 maxrjones