The colors shown in the legend do not match the actual colors of the scatter points in the plot.
using GMT, DataFrames
df = DataFrame(
longitude=linspace(0.0, 170.0, 100),
latitude=linspace(0.0, 80.0, 100),
type=repeat(["A", "B", "C", "D"], inner=25)
)
coast(region=(0, 170, 0, 80), proj=:Mercator, frame=:auto)
scatter!(
df;
xvar=:longitude,
yvar=:latitude,
proj=:Mercator,
groupvar=:type,
cmap=(:red, :blue, :green, :black),
marker=:c,
legend=true,
show=true
)
