Psxy not working with -O and -K

Hello everyone,
I have been having a hard time using psxy recently. I have a text file (gravstn.txt) with Lon and Lat values and I wish to plot them on the map of Tanzania. Here’s the code:

gmt pscoast -R25/45/-15/5 -JM6i -L28/-14+c-14+w500k+u+f -Ba5g5 -Dh -N1/0.5p -W1p -Gwhite -Scornflowerblue -K >
gmt psxy gravstn.txt -R25/45/-15/5 -JM6i -Sc0.002c -Gred -Ba5g5 -O >
gmt psconvert -A -Tg

Here’s the file: (237.7 KB)

When I run the code, I get the following message: (732 Bytes)

Does anyone know the solution to this problem?
Best regards,

You need a >> instead of > on your second line to append to the ps file rather than create a new ps file.

gmt psxy gravstn.txt -R25/45/-15/5 -JM6i -Sc0.002c -Gred -Ba5g5 -O >>

1 Like

Thank you. It has worked !