gnuplot is capable of handling data plotted along a date/time axis and can understand and display dates and times in a variety of formats.
If you are plotting data versus time, you are almost certainly dealing with data tabulated in a file. We have supplied a small file for this recipe called timedat.dat
; it consists of a few lines of data, each line containing a date, time, and a number to be plotted. The dates are in the form day/month/2-digit-year, and the times are in the form hour:minute. Following is the first line:
1/1/11 19:00 72.01
The following figure shows plotting with dates using gnuplot:
Note that the tics along the bottom axis are labeled as dates.