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.

36 SET-SHOW gnuplot 4.0 69<br />

36.24 Grid<br />

The set grid command allows grid lines to be drawn on the plot.<br />

Syntax:<br />

set grid {{no}{m}xtics} {{no}{m}ytics} {{no}{m}ztics}<br />

{{no}{m}x2tics} {{no}{m}y2tics}<br />

{{no}{m}cbtics}<br />

{polar {}}<br />

{layerdefault | front | back}<br />

{ {linestyle }<br />

| {linetype | lt }<br />

{linewidth | lw }<br />

{ , {linestyle | ls }<br />

| {linetype | lt }<br />

{linewidth | lw } } }<br />

unset grid<br />

show grid<br />

The grid can be enabled and disabled for the major and/or minor tic marks on any axis, and the linetype<br />

and linewidth can be specified for major and minor grid lines, also via a predefined linestyle, as far as<br />

the active terminal driver supports this.<br />

Additionally, a polar grid can be selected for 2-d plots — circles are drawn to intersect the selected tics,<br />

and radial lines are drawn at definable intervals. (The interval is given in degrees or radians, depending<br />

on the set angles setting.) Note that a polar grid is no longer automatically generated in polar mode.<br />

The pertinent tics must be enabled before set grid can draw them; gnuplot will quietly ignore instructions<br />

to draw grid lines at non-existent tics, but they will appear if the tics are subsequently enabled.<br />

If no linetype is specified for the minor gridlines, the same linetype as the major gridlines is used. The<br />

default polar angle is 30 degrees.<br />

If front is given, the grid is drawn on top of the graphed data. If back is given, the grid is drawn<br />

underneath the graphed data. Using front will prevent the grid from being obscured by dense data.<br />

The default setup, layerdefault, is equivalent to back for 2d plots. In 3D plots the default is to split<br />

up the grid and the graph box into two layers: one behind, the other in front of the plotted data and<br />

functions. Since hidden3d mode does its own sorting, it ignores all grid drawing order options and<br />

passes the grid lines through the hidden line removal machinery instead. These options actually affect<br />

not only the grid, but also the lines output by set border and the various ticmarks (see set xtics<br />

(p. 149)).<br />

Z grid lines are drawn on the bottom of the plot. This looks better if a partial box is drawn around the<br />

plot — see set border (p. 56).<br />

36.25 Hidden3d<br />

The set hidden3d command enables hidden line removal for surface plotting (see splot (p. 154)).<br />

Some optional features of the underlying algorithm can also be controlled using this command.<br />

Syntax:<br />

set hidden3d {defaults} |<br />

{ {{offset } | {nooffset}}<br />

{trianglepattern }<br />

{{undefined } | {noundefined}}<br />

{{no}altdiagonal}<br />

{{no}bentover} }<br />

unset hidden3d<br />

show hidden3d<br />

In contrast to the usual display in gnuplot, hidden line removal actually treats the given function or<br />

data grids as real surfaces that can’t be seen through, so parts behind the surface will be hidden by it.

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

Saved successfully!

Ooh no, something went wrong!