Dear all,
I have few questions on building a legend in GMT. Please refer to the code and the corresponding map below:
#!/usr/bin/env bash
echo 103.7 1.2 > line.tmp
echo 112 5 >> line.tmp
gmt begin test png
gmt basemap -R95/125/-5/15 -JM30c -Bafg10
gmt grdimage @earth_relief_02m -I+a15+ne0.75
gmt coast -Gsnow2 -Slightcyan -t10 -Wthinnest -N1/1p,darkgrey -Bafg10 -LjLB+c-5+f+w500k+u+o0.8c
# Plot
gmt plot line.tmp --PS_LINE_CAP=round -W4,tan3,0_10:0
gmt image anchor.png -Dg103.7/1.2+w0.5c
echo 112 5 | gmt plot -Sc0.2c -Gblue -W1,black
# Build legend
gmt legend -DjRT+w8.5c/4.7c+o0c -F+p1p+gwhite <<- EOF
H 15p,Helvetica-Bold Some map
G 0.18c
S 0.5c c 0.3c blue 1p 1.4c Destination
G 0.2c
I anchor.png 0.5c LT Terminal
G 0.2c
S 0.5c - 0.3i - 1p,- 1.4c Shipping Route
G 0.2c
S 0.5c - 0.8c black 3p 1.4c Pipe Route
EOF
gmt end show
rm *tmp
My questions:
- I used raster “anchor” in the legend as a symbol, now I am having difficulties to move it slightly right to align with other symbols, and also label it as “Port”.
- I want to show in the legend the dotted line that I have plotted using --PS_LINE_CAP=round command. How can I add it to the legend (in my map I used dashed line labelled “Shipping route”)
- Non-legend-related question. I could cover a seabed relief (perhaps there is a better way) with monochrome colour but not the land. Could you please give me a hint how to plot topography (gridimage) using one colour?
I am sorry for the long question, I hope it is not too much.
Regards,
Anuar