GNU Info

Info Node: (gnuplot.info)timefmt

(gnuplot.info)timefmt


Next: title Prev: timestamp Up: set-show
Enter node , (file) or (file)node

 This command applies to timeseries where data are composed of dates/times.
 It has no meaning unless the command `set xdata time` is given also.

 Syntax:
       set timefmt "<format string>"
       show timefmt

 The string argument tells `gnuplot` (Note: gnuplot ) how to read timedata
 from the datafile. The valid formats are:

       Format       Explanation
       %d           day of the month, 1--31
       %m           month of the year, 1--12
       %y           year, 0--99
       %Y           year, 4-digit
       %j           day of the year, 1--365
       %H           hour, 0--24
       %M           minute, 0--60
       %S           second, 0--60
       %b           three-character abbreviation of the name of the month
       %B           name of the month
 Any character is allowed in the string, but must match exactly.  \t (tab) is
 recognized.  Backslash-octals (\nnn) are converted to char.  If there is no
 separating character between the time/date elements, then %d, %m, %y, %H, %M
 and %S read two digits each, %Y reads four digits and %j reads three digits.
 %b requires three characters, and %B requires as many as it needs.

 Spaces are treated slightly differently.  A space in the string stands for
 zero or more whitespace characters in the file.  That is, "%H %M" can be used
 to read "1220" and "12     20" as well as "12 20".

 Each set of non-blank characters in the timedata counts as one column in the
 `using n:n` specification.  Thus `11:11  25/12/76  21.0` consists of three
 columns.  To avoid confusion, `gnuplot` requires that you provide a complete
 `using` (Note: using ) specification if your file contains timedata.

 Since `gnuplot` cannot read non-numerical text, if the date format includes
 the day or month in words, the format string must exclude this text.  But
 it can still be printed with the "%a", "%A", "%b", or "%B" specifier: see
 `set format` (Note: format ) for more details about these and other options
 for printing timedata.  (`gnuplot` will determine the proper month and weekday
 from the numerical values.)

 See also `set xdata` (Note: xdata ) and Time/date for more information.

 Example:
       set timefmt "%d/%m/%Y\t%H:%M"
 tells `gnuplot` to read date and time separated by tab.  (But look closely at
 your data---what began as a tab may have been converted to spaces somewhere
 along the line; the format string must match what is actually in the file.)


automatically generated by info2www version 1.2.2.9