Re: Date Time help
- From: Hans-Bernhard Broeker <broeker@xxxxxxxxxxxxxxxxxxxxx>
- Date: 17 Nov 2005 09:12:46 GMT
Agrapha <agrapha@xxxxxxxxx> wrote:
> I need a line graph with a moving window of time on the x-axis.
And who's going to cut one day's worth of data out of the (supposedly
larger data stream? IOW, who will be moving the window?
> So my difficulty is the 00 hour which moves thru the day depending on
> the hour we look at the data.
Not really. Your key difficulty is that your data file contains
information which you're not telling gnuplot to use: the date. You
need to present it with data that actually makes a difference between
15:00 today and 15:00 yesterday --- IOW, you need the date.
Read 'help time/date' and the sections it points you to, again, then
craft a timefmt setting that will read both the time and the date from
your file. You may have to adjust the file format a bit (get rid of
those pesky AM/PM hours), but other than that, it should just work.
Then
set format x "%H"
will put just the hour on the ticks, and yes, that will jump back from
23 to 0 at midnight.
> I have read the time/date help section but because of the moving
> window of hours I didn't see a clear way to plot the data.
I think you're failing to see the forest because you're staring too at
a single tree too much. The trick is that you need to get more
information than just the hour into gnuplot.
The only other option I see would be to forge the xtics manually,
ignoring the hour data in the file:
set xtics ('15' 0, '16' 1, ..., '15' 24)
plot 'data' using 5
--
Hans-Bernhard Broeker (broeker@xxxxxxxxxxxxxxxxxxxxx)
Even if all the snow were burnt, ashes would remain.
.
- References:
- Date Time help
- From: Agrapha
- Re: Date Time help
- From: Hans-Bernhard Broeker
- Re: Date Time help
- From: Agrapha
- Date Time help
- Prev by Date: Re: <datafile> argument for plot
- Next by Date: Re: Way to "retry" the plot command
- Previous by thread: Re: Date Time help
- Next by thread: GNUPLOT / CGI: Generating Plots for web browsers
- Index(es):
Relevant Pages
|