Skip to content

foresight_dgrid3d ​

foresight_dgrid3d, gnuplot's dgrid3d: scattered 3D data gridded for surfaces, pm3d and contours.

A port of gnuplot 6.0's grid_nongrid_data (plot3d.c): a grid of cols iso-curves of x, rows points along y each, over the bounding box of the defined points (the steps accumulated, as gnuplot's), each value a weighted mean of the points: inverse distance to the power q (qnorm q, a point on the node its value), a kernel of the distance scaled by dx, dy (gauss, cauchy, exp, box, hann; with kdensity the weighted sum, a density), or the thin plate splines through them (splines, gnuplot's LU solution).

Source: src/lib/foresight_dgrid3d.F90

Dependencies

Contents ​

Variables ​

NameTypeAttributesDescription
DGRID_QNORMinteger(kind=I4P)parameterqnorm q (gnuplot's default, q 1).
DGRID_SPLINESinteger(kind=I4P)parametersplines.
DGRID_GAUSSinteger(kind=I4P)parametergauss.
DGRID_CAUCHYinteger(kind=I4P)parametercauchy.
DGRID_EXPinteger(kind=I4P)parameterexp.
DGRID_BOXinteger(kind=I4P)parameterbox.
DGRID_HANNinteger(kind=I4P)parameterhann.

Derived Types ​

dgrid3d_object ​

dgrid3d settings of a panel (gnuplot set dgrid3d).

Components

NameTypeAttributesDescription
onlogicalData gridded.
rowsinteger(kind=I4P)Points along y of each iso-curve.
colsinteger(kind=I4P)Iso-curves of x.
modeinteger(kind=I4P)Weighting.
norminteger(kind=I4P)The q of qnorm.
scalereal(kind=R8P)Kernel scales along x and y.
kdensitylogicalWeighted sums, not means (kdensity).

Subroutines ​

dgrid3d_grid ​

The grid of the points (px, py, pz, colors pc) where defined: gx, gy, gz, gc (point along y, iso-curve of x), the curves in gnuplot's making order (x growing); ok false if no point is defined.

Attributes: pure

fortran
subroutine dgrid3d_grid(px, py, pz, pc, defined, settings, gx, gy, gz, gc, ok)

Arguments

NameTypeIntentAttributesDescription
pxreal(kind=R8P)inAbscissae.
pyreal(kind=R8P)inOrdinates.
pzreal(kind=R8P)inHeights.
pcreal(kind=R8P)inColor values.
definedlogicalinPoints defined.
settingstype(dgrid3d_object)inSettings.
gxreal(kind=R8P)outallocatableGrid abscissae.
gyreal(kind=R8P)outallocatableGrid ordinates.
gzreal(kind=R8P)outallocatableGrid heights.
gcreal(kind=R8P)outallocatableGrid color values.
oklogicaloutGridded.

Call graph

thin_plate_splines ​

gnuplot's thin_plate_splines_setup: the coefficients b of the thin plate splines through the points (n weights, then the affine part), the system solved by gnuplot's LU decomposition.

Attributes: pure

fortran
subroutine thin_plate_splines(xx, yy, zz, b)

Arguments

NameTypeIntentAttributesDescription
xxreal(kind=R8P)inPoints.
yyreal(kind=R8P)inPoints.
zzreal(kind=R8P)inPoints.
breal(kind=R8P)outallocatableCoefficients (n + 3).

Call graph

lu_decomp ​

gnuplot's lu_decomp (Crout with implicit pivoting, matrix.c): a overwritten by its LU decomposition, indx the row permutation.

Attributes: pure

fortran
subroutine lu_decomp(a, indx)

Arguments

NameTypeIntentAttributesDescription
areal(kind=R8P)inoutMatrix (row, column).
indxinteger(kind=I4P)outPivot rows.

Call graph

lu_backsubst ​

gnuplot's lu_backsubst: b overwritten by the solution of the decomposed system.

Attributes: pure

fortran
subroutine lu_backsubst(a, indx, b)

Arguments

NameTypeIntentAttributesDescription
areal(kind=R8P)inDecomposed matrix.
indxinteger(kind=I4P)inPivot rows.
breal(kind=R8P)inoutRight side, solution.

Call graph

grid_series ​

The points of a 3D series replaced by their grid (foresight_dgrid3d, gnuplot's set dgrid3d): its iso-curves of x as its scans (gnuplot keeps them last first), its color values (palette z) gridded with its heights; the per point colors, sizes and texts dropped.

fortran
subroutine grid_series(series, settings)

Arguments

NameTypeIntentAttributesDescription
seriestype(series_object)inoutSeries.
settingstype(dgrid3d_object)inGridding.

Call graph

Functions ​

kernel ​

gnuplot's splines_kernel: h^2 log h.

Attributes: pure

Returns: real(kind=R8P)

fortran
function kernel(h) result(k)

Arguments

NameTypeIntentAttributesDescription
hreal(kind=R8P)inDistance.

Call graph

pythag ​

gnuplot's pythag (Numerical Recipes): the length of (dx, dy) without overflow.

Attributes: pure

Returns: real(kind=R8P)

fortran
function pythag(dx, dy) result(d)

Arguments

NameTypeIntentAttributesDescription
dxreal(kind=R8P)inComponents.
dyreal(kind=R8P)inComponents.

Call graph

qnorm ​

gnuplot's qnorm: the distance (q 1), its square (q 2), its q-th power.

Attributes: pure

Returns: real(kind=R8P)

fortran
function qnorm(dist_x, dist_y, q) result(dist)

Arguments

NameTypeIntentAttributesDescription
dist_xreal(kind=R8P)inComponents.
dist_yreal(kind=R8P)inComponents.
qinteger(kind=I4P)inPower.

Call graph

Released under the GPL v3, BSD 2-Clause, BSD 3-Clause or MIT License.