format - Gnuplot Date and Time on the x axis -
What I want to do is a graph, where my x axis takes a date from the first column of data and then a time From my second column and using both to create an X-axis,
I have a set of data from a date logger that I want to graph on Gnuplot, because I get new data every day And it would be just like every T.T.T. Adding to the file as much as I find them
The text file looks like this (each span is 24 hours)
Date time value
30/07 / 2014 00:59:38 0.075
30/07/2014 00:58:34 0.102
30/07/2014 00:57:31 0.058
30/07/2014 00: 56:31 0.089
30/07/2014 00:55:28 0.119
30/07/2014 00:54:26 0.151
30/07/2014 00:53:22 0.17
30 / 07/2014 00:52:19 0.171 - 30/07/2014 00:51:17 0.221
30/07/2014 00:50:17 0
30/07/2014 00:49: 13 0
30 / 07/2014 00:48:11 0
30/07/2014 00:47:09 0
This solution will suit me perfectly, but its very complex and I do not know what's going on, Akel It is applied to many files
Here I tried the code, but I get illegal day error month?
#! / Gnuplot set timezone '% d /% m /% y% H:% M:% S' set xdata time set format x '% d /% m /% y% h:% M:% s' #data files plot Use of '30 .07.2014 Solittext' with 1: 3 title '30 / 07/2014 'Pt5 lc rgb' red ', '31 .07.2014 soli.txt' grind 5 lc rgb with 'blue' : 3 by using the title '31 / 07/2014 '
All help was appreciated! Thanks
An error like this has triggered, if some unexpected data appears in the data file , Such as a simulation and unused header line in your case.
The following file.dat
date time value 30/07/2014 00:59:38 0.075 30/07/2014 00:58 : 34 0.102
Returns the error with at least the script
set xdata time to set timefmt '% d /% to solve the error , Delete the first line (or similar lines): 1: 3
using m /% Y% H:% M:% 'plot' file. Dat '.
With version 4.6.6 you can also use the skip
option to leave some rows at the beginning of the data file like:
Set ExData Time Set Time FMT '% d /% M /% Y% H:% M:% Pl except' file.dat '1: 3 1
Comments
Post a Comment