# Time series plot with decimal year input

**URL:** <https://forum.generic-mapping-tools.org/t/time-series-plot-with-decimal-year-input/1393>\
**Category:** Q&A\
**Created:** [February 25, 2021, 9:41pm UTC](https://forum.generic-mapping-tools.org/t/time-series-plot-with-decimal-year-input/1393 "2021-02-25T21:41:45Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Anuar](https://avatars.discourse-cdn.com/v4/letter/a/e95f7d/32.png) [@Anuar](https://forum.generic-mapping-tools.org/u/Anuar)\
**Post date:** [February 25, 2021, 9:41pm UTC](https://forum.generic-mapping-tools.org/t/time-series-plot-with-decimal-year-input/1393/1 "2021-02-25T21:41:45Z")

</div>

Dear all,

I am new to GMT but before posting this question I did my homework: watched all unavco videos and worked through some useful for me examples. I would like to plot velocity time series of three gps sites (sit1, sit2, sit3 attached): decimal year (the first column) against velocity in mm/hour (the fourth column). This is the furthest I could get:

gmt begin ts\_vel\_arg1 pdf,png  
#gmt set FORMAT\_DATE\_IN dd-o-yy  
#gmt set FORMAT\_TIME\_PRIMARY\_MAP abbreviated PS\_CHAR\_ENCODING ISOLatin1+  
#gmt set FORMAT\_DATE\_MAP=-o FONT\_ANNOT\_PRIMARY +9p  
gmt plot vel\_sit1\_206h.out -R2020.000/2020.999/0/15 -JX20c/10c   
-i0,3 -Sc0.2s -Gred -B  
#-i0,3 -W2p,red -B  
#-Bpxa7Rf1d -Bsxa1O  
gmt end show

 ![ts_vel_arg1](https://canada1.discourse-cdn.com/flex047/uploads/gmt/original/2X/4/41e40f757bb4adbb7de337d8faecebdf3a19feec.png)

I could not find set FORMAT\_DATE\_IN decimal year in the documentation. Ideally, I would like to plot all three stations at the same plot connecting all my dots and make it prettier with labels and legend. Any help or hint would be appreciated!

Thank you for your attention,  
Anuar  
[vel\_sit1\_206h.txt](https://forum.generic-mapping-tools.org/uploads/short-url/nV8d1qYjkg1t2x3e6M1BLMxEgn3.txt) (43.7 KB) [vel\_sit2\_206h.txt](https://forum.generic-mapping-tools.org/uploads/short-url/1lXPJDZY7oWbCfusdUJOBM2We4H.txt) (28.0 KB) [vel\_sit3\_206h.txt](https://forum.generic-mapping-tools.org/uploads/short-url/1P8gOIMd8ZB7xdoS7hrLQmMQFHg.txt) (32.4 KB)

---

<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:** [February 26, 2021, 4:23am UTC](https://forum.generic-mapping-tools.org/t/time-series-plot-with-decimal-year-input/1393/2 "2021-02-26T04:23:12Z")

</div>

FORMAT\_DATE\_IN etc has to do with proper absolute time records. Your decimal years are, I believe, a bit fake since years have different lengths so 2020.xxxxxx is not necessarily the same date as 2021.xxxxxx. You should just treat your decimal years as Cartesian coordinates.  
If you want real, fancy abs time annotations (month names, etc) you will have to plot the baseframe separately with basemap and give actual ISO timestamp start/stop etc (e.t., 2020-01-1T/2020-09-15T14:35), then overlay your Cartesian data with its own near-matching -R and same linear scaling - you probably cannot tell the difference.

---

<div class="post-metadata">

**Author:** ![Anuar](https://avatars.discourse-cdn.com/v4/letter/a/e95f7d/32.png) [@Anuar](https://forum.generic-mapping-tools.org/u/Anuar)\
**Post date:** [February 26, 2021, 8:17am UTC](https://forum.generic-mapping-tools.org/t/time-series-plot-with-decimal-year-input/1393/3 "2021-02-26T08:17:39Z")

</div>

Thank you very much Professor Wessel for your detailed response! I will try to implement your comments.
