O'Reilly logo

gnuplot Cookbook by Lee Phillips

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Plotting with dates and times

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.

Getting ready

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:

Getting ready

Note ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required