Legend in Subplot

Hi,

I have a problem with the positioning of legend in subplots. If I define a projection the legend text and box are shifted. I’m using GMT 6.2.0 on a mac.

Here’s my example:

coastline=-W0.2,black
R="-R-75/-32/-36/10"
gmt set MAP_FRAME_AXES lrtb
file=Suture_Zones_2019.gmt
pen=1p

gmt begin map
  gmt subplot begin 1x3 -Ff19c/7.6 -A+jTL+o-0.2c/0 $R
    gmt subplot set
    gmt coast -B $coastline -A3000 -JQ?
    #overlays
    gmt plot $file -W${pen} -l"Suture Zones" -JQ?

    gmt subplot set
    #overlays
    gmt coast -B $coastline -A3000 -JM?
    gmt plot $file -W${pen} -l"Suture Zones"

    gmt subplot set
    #overlays
    gmt plot $file -W${pen} -l"Suture Zones"
    gmt coast -B $coastline -A3000
  gmt subplot end
gmt end show

Which produces this figure:

map.pdf (69.8 KB)

I’m very new with GMT 6 so am I missing something? Thanks!!

I cannot reproduce without the data file. However, note that the first command in a subplot forces the -B settings automatically (and see -S), and you should not repeat -JQ? for the overlay.

Hi, thanks for checking this for me! I have this result with anything I try to plot actually. I changed for an example with a simple circle that will not need a file to be reproduced.

I actually was just trying every possible option to see what works, so in the example I did every subplot trying something different to show what works and what doesn’t… See the last subplot, it’s the only one where the legend is in place, however without the projection setting the border is wrong.

Cheers!

gmt begin map
  gmt subplot begin 1x3 -Ff19c/7.6 -A+jTL+o-0.2c/0 -R-75/-32/-36/10
    gmt subplot set
    gmt coast -W0.2,black -A3000 -JQ?
    #overlays
    echo "-65 -10" | gmt plot -Sc0.5c -Gred -l"Suture Zones"

    gmt subplot set
    #overlays
    gmt coast -W0.2,black -A3000 -JM?
    echo "-65 -10" | gmt plot -Sc0.5c -Gred -l"Suture Zones"

    gmt subplot set
    #overlays
    echo "-65 -10" | gmt plot -Sc0.5c -Gred -l"Suture Zones"
    gmt coast -W0.2,black -A3000
  gmt subplot end
gmt end show

map.pdf (52.8 KB)