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.

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

70.87 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. 100) command.<br />

70.88 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.<br />

In 2-d, xrange and yrange determine the extent of the axes, trange determines the range of the<br />

parametric variable in parametric mode or the range of the angle in polar mode. Similarly in parametric<br />

3-d, xrange, yrange, and zrange govern the axes and urange and vrange govern the parametric<br />

variables.<br />

In polar mode, rrange determines the radial range plotted. acts as an additive constant to the<br />

radius, whereas acts as a clip to the radius — no point with radius greater than will<br />

be plotted. xrange and yrange are affected — the ranges can be set as if the graph was of r(t)-rmin,<br />

with rmin added to all the labels.<br />

Any range may be partially or totally autoscaled, although it may not make sense to autoscale a parametric<br />

variable unless it is plotted with data.

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

Saved successfully!

Ooh no, something went wrong!