I have a data file like this.
Sun May 12 14:21:25 BST 2019 -139.98438 20.88
Sun May 12 14:21:45 BST 2019 -139.93750 20.80
.<snip out="" lots="">
Sun May 12 18:50:48 BST 2019 -134.85938 32.26
Sun May 12 18:51:07 BST 2019 -134.85938 32.26
Sun May 12 18:51:27 BST 2019 -134.82812 32.26</snip>
The first few colums are obviusly the date and time, the next is a phase angle (degrees) and the next is a temperature. I have two problems
1) gnuplot does not read the time very well at all. In fact initially it interprets 14:21:25 as being 21:25, so the night instead of the afternoon. Later, after it has more data, which goes past the hour, it seems to have worked out the first 14 is the hour, and not the 21. I thought the set timefmt "%H:%M:%S" would have sorted that out, but it dodes not. (Note in the gnuplot file, it really is in quotes. Perhaps it should not be.)
2) When I plot the graph, which spans several hours, the x-axis is printing the full time, HH:MM:SS, when clearly the seconds don't need to be on a graph that spans hours. I want to strip off the seconds
3) Since this will run overnight, so the time will go past 23:59:59, I really want data at 00:00:01 on a Monday to ploted after that of 23:59:59 on the previous day. At the minute I am ignoring the date entirely, and only looking at the time.
set title "VNA phase & exhaust temperature from Sun May 12 14:21:25 BST 2019 to Sun May 12 18:57:18 BST 2019"
set xlabel "Time"
set ytics nomirror
set ylabel "Phase (degrees)"
set y2label "Temperature (degrees C)"
set y2range [20:34]
set y2tics 20,2,34 nomirror
set xdata time
set timefmt "%H:%M:%S"
set terminal postscript
set datafile commentschars "!#"
set size ratio 0.71 # this is the ratio of a DIN A4 page (21/29.7)
plot "data.txt" using 4:7 with lines lt rgb "red" title "Phase (degrees) at 11000.00000 MHz","data.txt" using 4:8 with lines lt rgb "blue" title "Temperature (deg C) by front left air vent of 8720D VNA" axes x1y2
I tried to attach the relevant data files and PDF, but can't see to, so have put links
I have a data file like this.
Sun May 12 14:21:25 BST 2019 -139.98438 20.88
Sun May 12 14:21:45 BST 2019 -139.93750 20.80
.<snip out="" lots="">
Sun May 12 18:50:48 BST 2019 -134.85938 32.26
Sun May 12 18:51:07 BST 2019 -134.85938 32.26
Sun May 12 18:51:27 BST 2019 -134.82812 32.26</snip>
(a complete copy is https://www.kirkbymicrowave.co.uk/data.txt )
The first few colums are obviusly the date and time, the next is a phase angle (degrees) and the next is a temperature. I have two problems
1) gnuplot does not read the time very well at all. In fact initially it interprets 14:21:25 as being 21:25, so the night instead of the afternoon. Later, after it has more data, which goes past the hour, it seems to have worked out the first 14 is the hour, and not the 21. I thought the set timefmt "%H:%M:%S" would have sorted that out, but it dodes not. (Note in the gnuplot file, it really is in quotes. Perhaps it should not be.)
2) When I plot the graph, which spans several hours, the x-axis is printing the full time, HH:MM:SS, when clearly the seconds don't need to be on a graph that spans hours. I want to strip off the seconds
3) Since this will run overnight, so the time will go past 23:59:59, I really want data at 00:00:01 on a Monday to ploted after that of 23:59:59 on the previous day. At the minute I am ignoring the date entirely, and only looking at the time.
set title "VNA phase & exhaust temperature from Sun May 12 14:21:25 BST 2019 to Sun May 12 18:57:18 BST 2019"
set xlabel "Time"
set ytics nomirror
set ylabel "Phase (degrees)"
set y2label "Temperature (degrees C)"
set y2range [20:34]
set y2tics 20,2,34 nomirror
set xdata time
set timefmt "%H:%M:%S"
set terminal postscript
set datafile commentschars "!#"
set size ratio 0.71 # this is the ratio of a DIN A4 page (21/29.7)
plot "data.txt" using 4:7 with lines lt rgb "red" title "Phase (degrees) at 11000.00000 MHz","data.txt" using 4:8 with lines lt rgb "blue" title "Temperature (deg C) by front left air vent of 8720D VNA" axes x1y2
I tried to attach the relevant data files and PDF, but can't see to, so have put links
Date file I want to plot.
https://www.kirkbymicrowave.co.uk/data.txt
Rather messed up version, which needs cleaning up. But how????
https://www.kirkbymicrowave.co.uk/plot-with-silly-x-axis.pdf