Error in the .txt file used for plot

Hello, I wanted to plot [RMS_gmt.txt|attachment] .(upload://eN5GW3spSsQaOfOxbLm3AiCxhEl.txt) (363 Bytes)

The column 0 and 1 is lat and lon. I want to plot circles of different colors for column 2 in the .txt file.

I have written the following code, but I am getting an error saying that “plot [WARNING]: Mismatch between actual (3) and expected (4) fields near line 1 in file C:/Users/.gmt/cache/RMS_gmt.txt”.

Please help to resolve the error and make plot similar to as attached.

#!/bin/bash

gmt begin velocity_plot

gmt makecpt -Cred,green,blue -T0.0015,0.0030,0.0050,0.0077

gmt coast -R66/95/8/36 -JM6i -B -Ggray

gmt plot @RMS_gmt.txt -Wfaint -i1,0,2s100 -Scc -C

gmt end show

Turning your example into a one-liner (I’m maniac on one-liners for simple scripts), I get

gmt plot @RMS_gmt.txt -Wfaint -i1,0,2s100 -Scc -C -png lixo
gmtinfo [ERROR]: Libcurl Error: HTTP response code said error
gmtinfo [ERROR]: Probably means @RMS_gmt.txt does not exist on the remote server
gmtinfo [ERROR]: Unable to obtain remote file @RMS_gmt.txt
plot [ERROR]: Libcurl Error: HTTP response code said error
plot [ERROR]: Probably means @RMS_gmt.txt does not exist on the remote server

The @ sign is to be used only for documented remotely hosted files and RMS_gmt.txt is not one of them. Try without it.

1 Like

You are also asking GMT to read 4 columns (lon, lat, col3, size) since -Ssc means read size from last column in file, after the lon,lat, whatever your third column is (depth|magnitude) and then we need symbol size.

1 Like

Thank you