01.02.2014 Views

GNUPlot Manual

GNUPlot Manual

GNUPlot Manual

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

148 gnuplot 4.0 36 SET-SHOW<br />

x2label: The x2-axis label is placed above the top axis but below the plot title. It is also possible to<br />

create an x2-axis label by using new-line characters to make a multi-line plot title, e.g.,<br />

set title "This is the title\n\nThis is the x2label"<br />

Note that double quotes must be used. The same font will be used for both lines, of course.<br />

If you are not satisfied with the default position of an axis label, use set label instead–that command<br />

gives you much more control over where text is placed.<br />

Please see syntax (p. 26) for further information about backslash processing and the difference between<br />

single- and double-quoted strings.<br />

36.83 Xmtics<br />

The set xmtics command converts the x-axis tic marks to months of the year where 1=Jan and 12=Dec.<br />

Overflows are converted modulo 12 to months. The tics are returned to their default labels by unset<br />

xmtics. Similar commands perform the same duties for the other axes.<br />

Syntax:<br />

set xmtics<br />

unset xmtics<br />

show xmtics<br />

The same syntax applies to x2mtics, ymtics, y2mtics, zmtics and cbmtics.<br />

See also the set format (p. 66) command.<br />

36.84 Xrange<br />

The set xrange command sets the horizontal range that will be displayed. A similar command exists<br />

for each of the other axes, as well as for the polar radius r and the parametric variables t, u, and v.<br />

Syntax:<br />

set xrange { [{{}:{}}] {{no}reverse} {{no}writeback} }<br />

| restore<br />

show xrange<br />

where and terms are constants, expressions or an asterisk to set autoscaling. If the data<br />

are time/date, you must give the range as a quoted string according to the set timefmt format. Any<br />

value omitted will not be changed.<br />

The same syntax applies to yrange, zrange, x2range, y2range, cbrange, rrange, trange, urange<br />

and vrange.<br />

The reverse option reverses the direction of the axis, e.g., set xrange [0:1] reverse will produce an<br />

axis with 1 on the left and 0 on the right. This is identical to the axis produced by set xrange [1:0],<br />

of course. reverse is intended primarily for use with autoscale.<br />

The writeback option essentially saves the range found by autoscale in the buffers that would be<br />

filled by set xrange. This is useful if you wish to plot several functions together but have the range<br />

determined by only some of them. The writeback operation is performed during the plot execution, so<br />

it must be specified before that command. To restore, the last saved horizontal range use set xrange<br />

restore. For example,<br />

set xrange [-10:10]<br />

set yrange [] writeback<br />

plot sin(x)<br />

set yrange restore<br />

replot x/2<br />

results in a yrange of [-1:1] as found only from the range of sin(x); the [-5:5] range of x/2 is ignored.<br />

Executing show yrange after each command in the above example should help you understand what<br />

is going on.

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

Saved successfully!

Ooh no, something went wrong!