---
name: "plsurf3d"
section: "3plplot"
platform: "linux"
package: "plplot-doc"
version: "5.15.0+dfsg2-15"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/plsurf3d"
---

# plsurf3d(3plplot)

Plot shaded 3-d surface plot

## NAME

**plsurf3d** - Plot shaded 3-d surface plot

## SYNOPSIS

**plsurf3d**(*x*, *y*, *z*, *nx*, *ny*, *opt*, *clevel*, *nlevel*)

## DESCRIPTION

Plots a three-dimensional shaded surface plot within the environment set up by [**plw3d**(3plplot)](/plw3d/3plplot.md).  The surface is defined by the two-dimensional matrix *z*\[*nx*\]\[*ny*\], the point *z*\[i\]\[j\] being the value of the function at (*x*\[i\],*y*\[j\]). Note that the points in vectors *x* and *y* do not need to be equally spaced, but must be stored in ascending order. For further details see the PLplot documentation.

Redacted form: **plsurf3d(x, y, z, opt, clevel)**

This function is not used in any examples.

## ARGUMENTS

- *x* (**PLFLT\_VECTOR**(3plplot), input)

  A vector containing the x coordinates at which the function is evaluated.

- *y* (**PLFLT\_VECTOR**(3plplot), input)

  A vector containing the y coordinates at which the function is evaluated.

- *z* (**PLFLT\_MATRIX**(3plplot), input)

  A matrix containing function values to plot.  Should have dimensions of *nx* by *ny*.

- *nx* (**PLINT**(3plplot), input)

  Number of *x* values at which function is evaluated.

- *ny* (**PLINT**(3plplot), input)

  Number of *y* values at which function is evaluated.

- *opt* (**PLINT**(3plplot), input)

  Determines the way in which the surface is represented. To specify more than one option just add the options, e.g. FACETED + SURF\_CONT *opt*=FACETED : Network of lines is drawn connecting points at which function is defined. *opt*=BASE\_CONT : A contour plot is drawn at the base XY plane using parameters *nlevel* and *clevel*. *opt*=SURF\_CONT : A contour plot is drawn at the surface plane using parameters *nlevel* and *clevel*. *opt*=DRAW\_SIDES : draws a curtain between the base XY plane and the borders of the plotted function. *opt*=MAG\_COLOR : the surface is colored according to the value of Z; if MAG\_COLOR is not used, then the surface is colored according to the intensity of the reflected light in the surface from a light source whose position is set using [**pllightsource**(3plplot)](/pllightsource/3plplot.md).

- *clevel* (**PLFLT\_VECTOR**(3plplot), input)

  A vector containing the contour levels.

- *nlevel* (**PLINT**(3plplot), input)

  Number of elements in the clevel vector.

## AUTHORS

Many developers (who are credited at http://plplot.org/credits.php) have contributed to PLplot over its long history.

## SEE ALSO

PLplot documentation at http://plplot.org/documentation.php.
