Legends in subplots

Hi,

I’m trying to use subplots in GMT modern mode to show four figures with legends in. But GMT seems to be having trouble with the positions of the legend boxes and the contents of the legend itself. As a very simple example, the following code…

gmt begin panels
gmt subplot begin 2x2 -Fs8c -M5p -A -SCb -SRl -Bwstr
gmt subplot set
gmt basemap -R0/90/0/10
gmt legend -Dx1c/1c+w3c -F+gblue << EOF
L 10 C Legend
EOF
gmt subplot set
gmt basemap
gmt subplot set
gmt basemap
gmt subplot set
gmt basemap
gmt legend -Dx1c/1c+w3c -F+gblue << EOF
L 10 C Legend
EOF
gmt subplot end
end show

… produces this figure:

The x-coordinates of the legend box (the blue rectangle) and the contents appear to be correct, but the y-coordinates are strangely off. The legend works fine when I use it in a standalone figure, outside of the subplot environment. Am I missing something?

I’m using GMT 6.0.0 for Mac.

Thanks!

Tom

Can confirm your result, but please use GitHub when reporting bugs.

Ah, thanks. Sorry, I didn’t realise there was a better place for this.

No worries, I will work on this later today, but opening a bug report (issue) on the GitHub site allows for better tracing and documentation of addressing the problem.

The problem has been fixed in the master repository. Until 6.1 comes out later this month you can either build from source or avoid -Dx in the subplot legends.