I have a data file with 3 columns, the first contains dates/times in a
format which is recognized by the timeformat string timefmt '%d.%m.%Y
Now I'd like to plot the data in column 2 in a different date ranges
than the data in column 3, for example column 2 between [13:05 h, 13:30
h] and column 3 between [13:10, 13:20]. One range could easily be given
via xrange or an argument to plot, but the second range seems to be
quite difficult. My first naive attempt did not work for a reason I
understood later on, but it shows what the intension was:
set xdata time
set timefmt '%d.%m.%Y %H:%M:%S'
set format x "%H:%M"
set datafile separator "\t"
begin = "12.01.2006 13:05:00"
end = "12.01.2006 13:30:00"
t1 = "12.01.2006 13:10:00"
t2 = "12.01.2006 13:20:00"
plot [ begin: end] 'data.dat' using 1:2 w l, \
'data.dat' using 1:($1 > t1 && $1 < t2 ? $3 : 1/0) w l
Besides the problem with the ranges, the plot showed up fine -- if I
deleted the boolean condition.
Is there any function which can convert the strings t1 and t2 into the
internal-used format, e.g. seconds since 01.01.2000 00:00? Such a
conversion seems to happen to the strings begin and end in the xrange
specifier after plot. It should be quite impossible two define such a
conversion function by hand which converts years two seconds ...
Thank you very much in advance!