# Error in the .txt file used for plot

**URL:** <https://forum.generic-mapping-tools.org/t/error-in-the-txt-file-used-for-plot/3584>\
**Category:** Q&A\
**Created:** [January 6, 2023, 3:34pm UTC](https://forum.generic-mapping-tools.org/t/error-in-the-txt-file-used-for-plot/3584 "2023-01-06T15:34:35Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sujata](https://yyz1.discourse-cdn.com/flex047/user_avatar/forum.generic-mapping-tools.org/sujata/32/1906_2.png) [@Sujata](https://forum.generic-mapping-tools.org/u/Sujata)\
**Post date:** [January 6, 2023, 3:34pm UTC](https://forum.generic-mapping-tools.org/t/error-in-the-txt-file-used-for-plot/3584/1 "2023-01-06T15:34:35Z")

</div>

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.

 ![GMT_tut_9](https://canada1.discourse-cdn.com/flex047/uploads/gmt/original/2X/a/aafae73274c4f90b38d85b440601499593263c37.png)

#!/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

---

<div class="post-metadata">

**Author:** ![Joaquim](https://yyz1.discourse-cdn.com/flex047/user_avatar/forum.generic-mapping-tools.org/joaquim/32/16_2.png) [@Joaquim](https://forum.generic-mapping-tools.org/u/Joaquim)\
**Post date:** [January 6, 2023, 3:51pm UTC](https://forum.generic-mapping-tools.org/t/error-in-the-txt-file-used-for-plot/3584/2 "2023-01-06T15:51:01Z")

</div>

> [@Sujata](#):
>
> @RMS\_gmt.txt

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

```auto
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.

---

<div class="post-metadata">

**Author:** ![pwessel](https://yyz1.discourse-cdn.com/flex047/user_avatar/forum.generic-mapping-tools.org/pwessel/32/30_2.png) [@pwessel](https://forum.generic-mapping-tools.org/u/pwessel)\
**Post date:** [January 6, 2023, 3:53pm UTC](https://forum.generic-mapping-tools.org/t/error-in-the-txt-file-used-for-plot/3584/3 "2023-01-06T15:53:41Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Sujata](https://yyz1.discourse-cdn.com/flex047/user_avatar/forum.generic-mapping-tools.org/sujata/32/1906_2.png) [@Sujata](https://forum.generic-mapping-tools.org/u/Sujata)\
**Post date:** [January 6, 2023, 11:43pm UTC](https://forum.generic-mapping-tools.org/t/error-in-the-txt-file-used-for-plot/3584/4 "2023-01-06T23:43:23Z")

</div>

Thank you
