Problems with coast

Hello! We are trying to add the coastline to a grid in South America.
However, it does not draw the right coastline, and we cannot understand why.
It should be South America to the east and Pacific Ocean to the west, But it displays some islands…
This is our line of command:

gmt begin map pdf, ps
gmt coast -JT-77/-11/10c -R-91/-65/-17/-5 -I1blue -Cgray
gmt end show

Thanks in advance!

The islands are probably here for real.
Coast has an option to draw only object spanning enough surface, so if you want to get rid of the tiny chunks of dirt, you can use that (see -A)

1 Like

Hello @RocioBernal,

Welcome to the GMT forum :slightly_smiling_face:!

You are writing you want to add shorelines to your plot, but currently the code example you posted does not contain -W to add shorelines to your map. -I adds rivers and -C fills the lakes by a color.
If I expand your code:

# I rivers - here drawn in cyan with 1 point thickess
# W shorelines - here drawn in blue with 1 point thickess
# G land - here filled in lightgray
# C lakes - here filled in darkgray
gmt begin map_shorelines png
    gmt coast -JT-77/-11/10c -R-91/-65/-17/-5 -I1/1p,cyan -W1/1p,blue -Ggray80 -Cgray30 -Bafg
gmt end

I get this output figure:

Thank you very much! The help document did not mention that -W was a required argument. I really appreciate your help.

Probably because it is not a required argument. Perfectly valid to just plot lakes, for instance (-C) but then there are no shorelines.

1 Like