psxy: Syntax error: time steps in seconds must be <= 60

Added by Bernt Viggo 4 months ago

Greetings GMT users.

I am doing something wrong in a script. Cant figure it out.

Getting an error Message saying that timestep in seconds must be ⇐ 60.

I would be greatfull if anyone can see what's wrong.

I am trying to plot hourly timestep data with the format
"2019-10-11T00:00:00 23.4"

Any comments or help on this would be gratfull.

./Bernt

Script is shown below:
—--—--—--—--—--—--—--—--—
#!/bin/bash

PSFILE="myplot.ps"

R="2019-10-11T00:00:00/2019-10-20T23:00:00/0/40"

gmt gmtset FORMAT_DATE_MAP o FONT_ANNOT_PRIMARY 10p
gmt gmtset FORMAT_TIME_PRIMARY_MAP abbreviated PS_CHAR_ENCODING ISOLatin1

gmt psbasemap -R$R -JX6i/2i -K -P -Bpx1d -Bsx1O -Bpy20+l"[Euro]" -Y8i -BWSen+t"Header"+g255/255/183 > $PSFILE

gmt gmtset FORMAT_DATE_IN yyyy-mm-dd
gmt gmtset FORMAT_CLOCK_IN hh:mm:ss

echo "2019-10-11T00:00:00 23.4" > data.txt
echo "2019-10-11T01:00:00 13.4" > data.txt
echo "2019-10-11T02:00:00 23.4" > data.txt
echo "2019-10-11T03:00:00 53.4" > data.txt
echo "2019-10-11T04:00:00 53.4" > data.txt

gmt psxy data.txt -R$R -JX6i/2i -P -O -Bpy10 -Bpx500 -W,red >> $PSFILE

rm gmt.*
evince $PSFILE &


Replies (2)

RE: psxy: Syntax error: time steps in seconds must be <= 60 - Added by Bernt Viggo 4 months ago

should have been with >> before data.txt
but it gives same error Message.

RE: psxy: Syntax error: time steps in seconds must be <= 60 - Added by Paul 4 months ago

With time axes you cannot specify annotation intervals of 500 seconds. That is 8 minutes and 20 seconds. Is that what you really want? Your time axis represents 10 days so that would be 10*86400/500 = 1728 annotations, all unreadable of course.
Basically, use the units if you want more than 60 seconds, e.g. 10m for 10 minutes. The error is that you asked for more than 60 seconds, which means you should use minutes or even hours.

(1-2/2)