|
From: Steffen <st...@on...> - 2011-01-07 09:05:27
|
Wonderful! That works and is even smarter.
But I stumble over the next problem connected with time data:
If a have a file with date, sunrise and sunset time in three columns
like this:
2010-12-02 7:53 15:55
2010-12-03 7:55 15:54
2010-12-06 7:59 15:53
2010-12-07 8:00 15:53
2010-12-09 8:02 15:52
2010-12-10 8:04 15:52
and I want to plot the length of the day, i.e. sunset-sunrise then
plot 'datafile.dat' using 1:($3-$2)
does not produce the desired result. It seems that every calculation on
time formatted columns does not produce the expected results. How should
calculations with dates/times be done?
Steffen
Am 06.01.2011 21:35, schrieb Hans-Bernhard Bröker:
> On 06.01.2011 00:23, da...@la... wrote:
>> currently gnuplot only supports time on the X axis,
> I wonder what made believe that.
>
>> what you would need to
>> do is to manipulate the data before gnuplot tries to use it.
> No. This works:
>
> gnuplot> set xdata time
> gnuplot> set ydata time
> gnuplot> set timefmt x '%Y-%m-%d'
> gnuplot> set timefmt y '%H:%M'
> gnuplot> p '-' u 1:2 w lp
> input data ('e' ends)> 2010-12-02 7:53
> input data ('e' ends)> 2010-12-03 7:55
> input data ('e' ends)> 2010-12-06 7:59
> input data ('e' ends)> 2010-12-07 8:00
> input data ('e' ends)> e
> gnuplot>
>
>
> ------------------------------------------------------------------------------
> Learn how Oracle Real Application Clusters (RAC) One Node allows customers
> to consolidate database storage, standardize their database environment, and,
> should the need arise, upgrade to a full multi-node Oracle RAC database
> without downtime or disruption
> http://p.sf.net/sfu/oracle-sfdevnl
> _______________________________________________
> gnuplot-info mailing list
> gnu...@li...
> https://lists.sourceforge.net/lists/listinfo/gnuplot-info
|