On 29.12.2012 13:02, Alex van der Spek wrote:
> I have a datafile like this:
>
> +++++++++++++
> Date Sunrise Sunset Daylength
> 1 December 2012, Saturday 08:28 16:34 08:05
> 2 December 2012, Sunday 08:29 16:33 08:03
> 3 December 2012, Monday 08:31 16:33 08:01
> 4 December 2012, Tuesday 08:32 16:32 08:00
> 5 December 2012, Wednesday 08:33 16:32 07:58
> 6 December 2012, Thursday 08:35 16:31 07:56
> 7 December 2012, Friday 08:36 16:31 07:55
> +++++++++++++
>
> Columns are separated by tab (\t) characters. Total of 4 columns.
>
> I want to plot the Daylength versus the date. This presents a problem,
> timefmt cannot be used as the columns have different formats.
Not so fast. timefmt is actually per-axis, i.e. you can
set xdata time
set ydata time
set timefmt x '%d %B %Y'
set timefmt x '%H:%M'
plot 'data' using 1:4
If that doesn't work out, you should probably try some variation of
plot 'data' u (strptime('%d %B %Y',strcolumn(1)):(strptime('%H:%M',
strcolumn(4))
> I am
> trying to use timecolumn(n) with an explicit format expression which is
> part of the using clause:
Sorry, but that really can't work. The {'format'} part of the using
specification only works for ordinary data. It doesn't mix with
time/date data at all.