# Seriestime GMT

**URL:** <https://forum.generic-mapping-tools.org/t/seriestime-gmt/2365>\
**Category:** Q&A\
**Created:** [November 24, 2021, 2:21pm UTC](https://forum.generic-mapping-tools.org/t/seriestime-gmt/2365 "2021-11-24T14:21:19Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![annafiglioli](https://avatars.discourse-cdn.com/v4/letter/a/7feea3/32.png) [@annafiglioli](https://forum.generic-mapping-tools.org/u/annafiglioli)\
**Post date:** [November 24, 2021, 2:21pm UTC](https://forum.generic-mapping-tools.org/t/seriestime-gmt/2365/1 "2021-11-24T14:21:19Z")

</div>

Hello everyone

gmt begin series\_times pdf,png

gmt set GMT\_THEME cookbook

gmt set FORMAT\_DATE\_MAP=-o FONT\_ANNOT\_PRIMARY +9p

gmt set GMT\_LANGUAGE IT

gmt set IO\_COL\_SEPARATOR=tab

gmt info C:\programs\DATA\_MAGNITUDO.txt

gmt plot C:\programs\DATA\_MAGNITUDO.txt -Sc0.15c -Gcoral -R2006-01-08T/2021-01-04T/1.2/4.1 -Bxafg+l"Time" -Byafg+l"Magnitude"

gmt end show

this is my script.  
And I get this

 ![series_times](https://canada1.discourse-cdn.com/flex047/uploads/gmt/original/2X/b/b7bd3f54d74ffa42044c3a1c0ad4683b7be07a71.png)  
But ins’t good because no rappresent all data!

This is a part of my .txt file

| 2006-01-08 13.23.43.720 | 2.0 |
| --- | --- |
| 2006-01-08 13.26.27.290 | 2.8 |
| 2006-01-08 13.27.17.850 | 2.2 |
| 2006-01-08 13.28.03.070 | 2.7 |
| 2006-01-08 13.32.02.560 | 2.2 |
| 2006-01-08 13.33.10.440 | 2.9 |
| 2006-01-08 13.55.45.490 | 2.7 |
| 2006-01-08 13.59.56.090 | 2.9 |
| 2006-01-08 14.54.26.450 | 1.9 |
| 2006-01-08 15.08.49.580 | 2.5 |
| 2006-01-08 16.09.24.170 | 3.7 |
| 2006-01-08 17.12.40.840 | 2.9 |
| 2006-01-08 17.21.57.820 | 2.9 |
| 2006-01-08 17.53.47.220 | 2.1 |
| 2006-01-08 18.21.21.780 | 2.3 |
| 2006-01-08 18.56.56.430 | 2.7 |
| 2006-01-09 01.15.59.300 | 1.9 |
| 2006-05-20 05.50.44.150 | 2.5 |
| 2006-05-20 05.56.39.130 | 3.0 |
| 2006-05-20 05.58.47.620 | 2.2 |
| 2006-05-20 06.00.04.390 | 1.8 |
| 2006-05-20 06.02.26.750 | 2.0 |
| 2006-05-20 06.04.16.950 | 2.0 |
| 2006-05-20 06.05.59.320 | 3.1 |
| 2006-05-20 06.07.51.310 | 1.7 |
| 2006-05-20 06.08.13.850 | 2.4 |
| 2006-05-20 06.09.22.340 | 1.2 |
| 2006-05-20 06.11.37.800 | 2.0 |
| 2006-05-20 06.12.34.430 | 1.7 |
| 2006-05-20 06.19.23.220 | 2.1 |
| 2006-05-20 06.26.20.150 | 1.9 |
| 2006-05-20 06.27.12.770 | 1.5 |
| 2006-05-20 06.56.20.840 | 1.7 |
| 2006-05-20 07.03.49.630 | 1.9 |
| 2006-05-20 07.05.56.190 | 4.0 |
| 2006-05-20 07.08.15.030 | 2.3 |
| 2006-05-20 07.12.31.780 | 1.7 |
| 2006-05-20 07.17.23.510 | 1.8 |
| 2006-05-20 07.19.29.190 | 2.0 |
| 2006-05-20 07.30.41.920 | 2.8 |
| 2006-05-20 07.32.32.860 | 1.2 |
| 2006-05-20 07.35.54.070 | 1.7 |
| 2006-05-20 07.39.48.950 | 2.0 |
| 2006-05-20 09.15.05.810 | 1.7 |
| 2006-05-20 13.04.04.630 | 2.7 |
| 2006-05-20 13.14.30.400 | 1.6 |
| 2008-01-07 17.45.12.910 | 2.7 |
| 2008-01-07 17.46.11.350 | 1.4 |
| 2008-01-07 17.47.29.560 | 2.1 |
| 2008-01-07 18.13.20.590 | 2.6 |
| 2008-01-07 18.30.23.820 | 2.4 |
| 2008-01-07 18.32.10.920 | 2.2 |
| 2008-01-07 18.36.53.900 | 2.3 |
| 2008-01-07 18.39.41.950 | 2.2 |
| 2008-01-07 18.41.54.480 | 2.2 |
| 2008-01-07 22.35.51.490 | 2.1 |
| 2008-01-08 00.42.46.150 | 2.0 |
| 2008-01-08 00.43.13.610 | 1.5 |
| 2008-01-08 21.27.25.360 | 1.4 |
| 2008-12-16 01.48.15.660 | 2.5 |
| 2008-12-16 02.19.25.640 | 2.3 |
| 2008-12-16 02.22.05.990 | 2.2 |
| 2008-12-16 02.29.23.160 | 2.6 |
| 2008-12-16 02.30.14.630 | 4.0 |
| 2008-12-16 02.30.58.370 | 3.3 |
| 2008-12-16 02.32.01.300 | 2.7 |
| 2008-12-16 02.33.28.480 | 3.2 |
| 2008-12-16 02.38.16.880 | 2.5 |
| 2008-12-16 02.43.59.730 | 1.9 |
| 2008-12-16 02.45.22.530 | 2.5 |
| 2008-12-16 03.33.20.650 | 2.1 |
| 2008-12-16 03.50.47.820 | 2.0 |
| 2008-12-16 03.53.05.000 | 2.2 |
| 2008-12-16 04.34.49.800 | 2.5 |
| 2008-12-16 04.47.40.830 | 2.3 |
| 2008-12-16 04.49.45.460 | 1.9 |
| 2008-12-16 05.03.03.190 | 1.9 |
| 2008-12-16 05.29.15.320 | 2.4 |
| 2008-12-16 06.36.49.670 | 2.1 |
| 2008-12-16 08.23.45.970 | 2.5 |
| 2008-12-16 08.29.18.610 | 3.0 |
| 2008-12-16 08.47.22.210 | 2.1 |
| 2008-12-16 09.27.08.190 | 2.4 |
| 2008-12-16 09.38.41.270 | 2.3 |
| 2009-01-08 15.38.45.530 | 1.8 |
| 2009-01-08 15.39.49.500 | 2.8 |
| 2009-01-08 15.40.42.700 | 2.3 |
| 2009-01-08 15.42.46.570 | 3.1 |
| 2009-01-08 15.45.32.490 | 1.9 |
| 2009-01-08 15.47.05.500 | 1.7 |
| 2009-01-08 15.47.28.710 | 1.9 |
| 2009-01-08 15.48.10.510 | 2.5 |

There are date and magnitude.

Why no plot all data? What is the error? I think in gmt set i don’t put very well same of these command.

---

<div class="post-metadata">

**Author:** ![maxrjones](https://yyz1.discourse-cdn.com/flex047/user_avatar/forum.generic-mapping-tools.org/maxrjones/32/2698_2.png) [@maxrjones](https://forum.generic-mapping-tools.org/u/maxrjones)\
**Post date:** [November 24, 2021, 4:33pm UTC](https://forum.generic-mapping-tools.org/t/seriestime-gmt/2365/2 "2021-11-24T16:33:02Z")

</div>

Try adding `-i0,2 -fi0T,2d` to the end of your `gmt plot` command to set that the 1st and 3rd columns should be used for plotting and the first column is absolute time.

---

<div class="post-metadata">

**Author:** ![Andreas](https://avatars.discourse-cdn.com/v4/letter/a/ee7513/32.png) [@Andreas](https://forum.generic-mapping-tools.org/u/Andreas)\
**Post date:** [November 24, 2021, 4:49pm UTC](https://forum.generic-mapping-tools.org/t/seriestime-gmt/2365/3 "2021-11-24T16:49:04Z")

</div>

Not sure, but may be necessary to insert a T between the date and time (as in clock).

---

<div class="post-metadata">

**Author:** ![annafiglioli](https://avatars.discourse-cdn.com/v4/letter/a/7feea3/32.png) [@annafiglioli](https://forum.generic-mapping-tools.org/u/annafiglioli)\
**Post date:** [November 24, 2021, 5:24pm UTC](https://forum.generic-mapping-tools.org/t/seriestime-gmt/2365/4 "2021-11-24T17:24:04Z")

</div>

![series_times](https://canada1.discourse-cdn.com/flex047/uploads/gmt/original/2X/e/e94f983e1c72ee0d5ce7f63c4aca4a5af95f182d.png)

Thanks @maxrjones i plot all data.  
@Andreas it is possible but to do this for small dataset it ok…but i have a large dataset so it is very difficult.

Now i have another thingh to do…in axes x there is only the years why? I would like years-month-date…it is possible? I try more things.

---

<div class="post-metadata">

**Author:** ![maxrjones](https://yyz1.discourse-cdn.com/flex047/user_avatar/forum.generic-mapping-tools.org/maxrjones/32/2698_2.png) [@maxrjones](https://forum.generic-mapping-tools.org/u/maxrjones)\
**Post date:** [November 24, 2021, 5:34pm UTC](https://forum.generic-mapping-tools.org/t/seriestime-gmt/2365/5 "2021-11-24T17:34:01Z")

</div>

I recommend reading through this section of the cookbook to learn about the different settings that control the appearance of time axes: [https://docs.generic-mapping-tools.org/dev/cookbook/options.html#cartesian-time-axes](https://docs.generic-mapping-tools.org/dev/cookbook/options.html#cartesian-time-axes)

---

<div class="post-metadata">

**Author:** ![annafiglioli](https://avatars.discourse-cdn.com/v4/letter/a/7feea3/32.png) [@annafiglioli](https://forum.generic-mapping-tools.org/u/annafiglioli)\
**Post date:** [November 24, 2021, 6:14pm UTC](https://forum.generic-mapping-tools.org/t/seriestime-gmt/2365/6 "2021-11-24T18:14:52Z")

</div>

thanks very much.

---

<div class="post-metadata">

**Author:** ![Andreas](https://avatars.discourse-cdn.com/v4/letter/a/ee7513/32.png) [@Andreas](https://forum.generic-mapping-tools.org/u/Andreas)\
**Post date:** [November 24, 2021, 7:09pm UTC](https://forum.generic-mapping-tools.org/t/seriestime-gmt/2365/7 "2021-11-24T19:09:45Z")

</div>

Play with the parameter `--FORMAT_DATE_OUT`, e.g. `--FORMAT_DATE_OUT=dd.mm.yyyy `.

Also, which OS are you using? If you’re on Linux, just use `awk` to format your datatable.

To insert a `T` (ref. my post above), just do:

```auto
awk '{print $1 "T" $2,$3}' data.txt
2006-01-08T13.23.43.720 2.0
2006-01-08T13.26.27.290 2.8
2006-01-08T13.27.17.850 2.2
2006-01-08T13.28.03.070 2.7
2006-01-08T13.32.02.560 2.2
[...]

```

Knowing just a little bit of those basic tools will get you _a long_ way.

---

<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:** [November 24, 2021, 7:48pm UTC](https://forum.generic-mapping-tools.org/t/seriestime-gmt/2365/8 "2021-11-24T19:48:04Z")

</div>

Best to explain to the purveyor of the data that storing a single coordinate across two data columns is not a smart decision. One would not store distance in two columns, such as integer kilometers and then a second column for fractional km. It just adds extra aggravation and need for awk and similar tools. There is an [ISO standard](https://en.wikipedia.org/wiki/ISO_8601) for time date strings so no excuse for people to create such messes.

---

<div class="post-metadata">

**Author:** ![annafiglioli](https://avatars.discourse-cdn.com/v4/letter/a/7feea3/32.png) [@annafiglioli](https://forum.generic-mapping-tools.org/u/annafiglioli)\
**Post date:** [November 25, 2021, 7:50am UTC](https://forum.generic-mapping-tools.org/t/seriestime-gmt/2365/9 "2021-11-25T07:50:40Z")

</div>

Yes i did and i received this error  
C:\Users\Anna\>gmt set FORMAT\_DATA\_OUT=yyyy.mm.dd  
gmtset [ERROR]: Unrecognized keyword FORMAT\_DATA\_OUT.  
gmtset [ERROR]: 1 GMT Defaults conversion errors from command options

I use windows 10. and visual studio code.

---

<div class="post-metadata">

**Author:** ![EJFielding](https://yyz1.discourse-cdn.com/flex047/user_avatar/forum.generic-mapping-tools.org/ejfielding/32/82_2.png) [@EJFielding](https://forum.generic-mapping-tools.org/u/EJFielding)\
**Post date:** [November 25, 2021, 5:58pm UTC](https://forum.generic-mapping-tools.org/t/seriestime-gmt/2365/10 "2021-11-25T17:58:55Z")

</div>

I don’t remember ever seeing an earthquake data catalog that had the date and time in an ISO standard format. Many even have the year, month, day, hour, minute, and seconds in six separate columns. I think it is a remnant of Fortran code, which you may remember is extremely poor at parsing strings of characters.

---

<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:** [November 25, 2021, 8:33pm UTC](https://forum.generic-mapping-tools.org/t/seriestime-gmt/2365/11 "2021-11-25T20:33:15Z")

</div>

Per documentation the keyword is **FORMAT\_DATE\_OUT**.

---

<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:** [November 25, 2021, 9:30pm UTC](https://forum.generic-mapping-tools.org/t/seriestime-gmt/2365/12 "2021-11-25T21:30:42Z")

</div>

Yes, there is history here and decisions not to make changes. I think the Harvard/Ekstrom catalog when queried gives ISO time stamps. Then, I am not a seismologist so not that familiar with what IRIS does, for instance. But it is a single coordinate (point in time) and the decision to store it across 2-n columns is indeed rooted in punchcards…

---

<div class="post-metadata">

**Author:** ![annafiglioli](https://avatars.discourse-cdn.com/v4/letter/a/7feea3/32.png) [@annafiglioli](https://forum.generic-mapping-tools.org/u/annafiglioli)\
**Post date:** [November 27, 2021, 2:25pm UTC](https://forum.generic-mapping-tools.org/t/seriestime-gmt/2365/13 "2021-11-27T14:25:45Z")

</div>

thanks so much for your answers!
