Time

set xdata time indicates that the x coordinate represents a date or time to millisecond precision. There is an analogous command set ydata time.

There are separate format mechanisms for interpretation of time data on input and output. Input data is read from a file either by using the global timefmt or by using the function timecolumn() as part of the plot command. These input mechanisms also apply to using time values to set an axis range. See set timefmt (p. [*]), timecolumn (p. [*]).

Example:

    set xdata time
    set timefmt "%d-%b-%Y"
    set xrange ["01-Jan-2013" : "31-Dec-2014"]
    plot DATA using 1:2
or
    plot DATA using (timecolumn(1,"%d-%b-%Y")):2

For output, i.e. tick labels along that axis or coordinates output by mousing, the function 'strftime' (type "man strftime" on unix to look it up) is used to convert from the internal time in seconds to a string representation of a date. gnuplot tries to figure out a reasonable format for this. You can customize the format using either set format x or set xtics format. See time_specifiers (p. [*]) for a special set of time format specifiers. See also time/date (p. [*]) for more information.