14.10.2014 Views

gnuplot documentation

gnuplot documentation

gnuplot documentation

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

70 SET-SHOW <strong>gnuplot</strong> 4.3 137<br />

terminal supports vertical text. The constants and are offsets that let you adjust the<br />

position more finely. is used to specify the font with which the time is to be written.<br />

The abbreviation time may be used in place of timestamp.<br />

Example:<br />

set timestamp "%d/%m/%y %H:%M" offset 80,-2 font "Helvetica"<br />

See set timefmt (p. 137) for more information about time format strings.<br />

70.68 Timefmt<br />

This command applies to timeseries where data are composed of dates/times. It has no meaning unless<br />

the command set xdata time is given also.<br />

Syntax:<br />

set timefmt ""<br />

show timefmt<br />

The string argument tells <strong>gnuplot</strong> how to read timedata from the datafile. The valid formats are:<br />

Time Series timedata Format Specifiers<br />

Format Explanation<br />

%d day of the month, 1–31<br />

%m month of the year, 1–12<br />

%y year, 0–99<br />

%Y year, 4-digit<br />

%j day of the year, 1–365<br />

%H hour, 0–24<br />

%M minute, 0–60<br />

%s seconds since the Unix epoch (1970-01-01 00:00 UTC)<br />

%S second, 0–60<br />

%b three-character abbreviation of the name of the month<br />

%B name of the month<br />

Any character is allowed in the string, but must match exactly. \t (tab) is recognized. Backslash-octals<br />

(\nnn) are converted to char. If there is no separating character between the time/date elements, then<br />

%d, %m, %y, %H, %M and %S read two digits each, %Y reads four digits and %j reads three digits.<br />

%b requires three characters, and %B requires as many as it needs.<br />

Spaces are treated slightly differently. A space in the string stands for zero or more whitespace characters<br />

in the file. That is, "%H %M" can be used to read "1220" and "12 20" as well as "12 20".<br />

Each set of non-blank characters in the timedata counts as one column in the using n:n specification.<br />

Thus 11:11 25/12/76 21.0 consists of three columns. To avoid confusion, <strong>gnuplot</strong> requires that you<br />

provide a complete using specification if your file contains timedata.<br />

Since <strong>gnuplot</strong> cannot read non-numerical text, if the date format includes the day or month in words,<br />

the format string must exclude this text. But it can still be printed with the "%a", "%A", "%b", or<br />

"%B" specifier: see set format (p. 100) for more details about these and other options for printing<br />

timedata. (<strong>gnuplot</strong> will determine the proper month and weekday from the numerical values.)<br />

See also set xdata (p. 140) and Time/date (p. 39) for more information.<br />

Example:<br />

set timefmt "%d/%m/%Y\t%H:%M"<br />

tells <strong>gnuplot</strong> to read date and time separated by tab. (But look closely at your data — what began as<br />

a tab may have been converted to spaces somewhere along the line; the format string must match what<br />

is actually in the file.) See also<br />

time data demo.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!