Syntax:
set dgrid3d {<row_size>} {,{<col_size>} {,<norm>}} set nodgrid3d show dgrid3d
By default dgrid3d is disabled. When enabled, 3-d data read from a file are always treated as a scattered data set. A grid with dimensions derived from a bounding box of the scattered data and size as specified by the row/col_size parameters is created for plotting and contouring. The grid is equally spaced in x and y; the z values are computed as weighted averages of the scattered points' values.
The third parameter, norm, controls the weighting: each point is weighted
inversely by its distance (from the grid point) raised to the norm power.
(Actually it's not quite the distance: the weights are given by the inverse
of dx^
norm + dy^
norm, where dx and dy are the components of the separation
of the grid point from each data point.) Thus the closer the data point is
to a grid point, the more effect it has on that grid point. In gnuplot,
this distance computation is optimized for norms that are powers of 2,
specifically 1, 2, 4, 8, and 16, but any non-negative integer can be used.
The dgrid3d option is a simple low pass filter that converts scattered data to a grid data set. More sophisticated approaches to this problem exist and should be used to preprocess the data outside gnuplot if this simple solution is found inadequate.
Examples:
set dgrid3d 10,10,1 # defaults set dgrid3d ,,4
The first specifies that a grid of size 10 by 10 is to be constructed using the L2 norm (a norm of 2 is to be used in the distance computation). The second only modifies the norm to be used to L4.