(octave.info)Three-Dimensional Plots


Next: Plot Annotations Prev: Two-Dimensional Plots Up: High-Level Plotting
Enter node , (file) or (file)node

15.2.2 Three-Dimensional Plots
------------------------------

The function ‘mesh’ produces mesh surface plots.  For example,

     tx = ty = linspace (-8, 8, 41)';
     [xx, yy] = meshgrid (tx, ty);
     r = sqrt (xx .^ 2 + yy .^ 2) + eps;
     tz = sin (r) ./ r;
     mesh (tx, ty, tz);
     xlabel ("tx");
     ylabel ("ty");
     zlabel ("tz");
     title ("3-D Sombrero plot");

produces the familiar “sombrero” plot shown in *note Figure 15.5:
fig:mesh.  Note the use of the function ‘meshgrid’ to create matrices of
X and Y coordinates to use for plotting the Z data.  The ‘ndgrid’
function is similar to ‘meshgrid’, but works for N-dimensional matrices.

[image src="mesh.png" text="
+---------------------------------+
| Image unavailable in text mode. |
+---------------------------------+"]

Figure 15.5: Mesh plot.

   The ‘meshc’ function is similar to ‘mesh’, but also produces a plot
of contours for the surface.

   The ‘plot3’ function displays arbitrary three-dimensional data,
without requiring it to form a surface.  For example,

     t = 0:0.1:10*pi;
     r = linspace (0, 1, numel (t));
     z = linspace (0, 1, numel (t));
     plot3 (r.*sin (t), r.*cos (t), z);
     xlabel ("r.*sin (t)");
     ylabel ("r.*cos (t)");
     zlabel ("z");
     title ("plot3 display of 3-D helix");

displays the spiral in three dimensions shown in *note Figure 15.6:
fig:plot3.

[image src="plot3.png" text="
+---------------------------------+
| Image unavailable in text mode. |
+---------------------------------+"]

Figure 15.6: Three-dimensional spiral.

   Finally, the ‘view’ function changes the viewpoint for
three-dimensional plots.

 -- : mesh (X, Y, Z)
 -- : mesh (Z)
 -- : mesh (..., C)
 -- : mesh (..., PROP, VAL, ...)
 -- : mesh (HAX, ...)
 -- : H = mesh (...)
     Plot a 3-D wireframe mesh.

     The wireframe mesh is plotted using rectangles.  The vertices of
     the rectangles [X, Y] are typically the output of ‘meshgrid’.  over
     a 2-D rectangular region in the x-y plane.  Z determines the height
     above the plane of each vertex.  If only a single Z matrix is
     given, then it is plotted over the meshgrid ‘X = 1:columns (Z), Y =
     1:rows (Z)’.  Thus, columns of Z correspond to different X values
     and rows of Z correspond to different Y values.

     The color of the mesh is computed by linearly scaling the Z values
     to fit the range of the current colormap.  Use ‘caxis’ and/or
     change the colormap to control the appearance.

     Optionally, the color of the mesh can be specified independently of
     Z by supplying a color matrix, C.

     Any property/value pairs are passed directly to the underlying
     surface object.

     If the first argument HAX is an axes handle, then plot into this
     axes, rather than the current axes returned by ‘gca’.

     The optional return value H is a graphics handle to the created
     surface object.

     See also: Note: ezmesh, Note: meshc, Note:
     meshz, Note: trimesh, *note contour:
     XREFcontour, Note: surf, Note: surface,
     Note: meshgrid, Note: hidden, Note:
     shading, Note: colormap, *note caxis:
     XREFcaxis.

 -- : meshc (X, Y, Z)
 -- : meshc (Z)
 -- : meshc (..., C)
 -- : meshc (..., PROP, VAL, ...)
 -- : meshc (HAX, ...)
 -- : H = meshc (...)
     Plot a 3-D wireframe mesh with underlying contour lines.

     The wireframe mesh is plotted using rectangles.  The vertices of
     the rectangles [X, Y] are typically the output of ‘meshgrid’.  over
     a 2-D rectangular region in the x-y plane.  Z determines the height
     above the plane of each vertex.  If only a single Z matrix is
     given, then it is plotted over the meshgrid ‘X = 1:columns (Z), Y =
     1:rows (Z)’.  Thus, columns of Z correspond to different X values
     and rows of Z correspond to different Y values.

     The color of the mesh is computed by linearly scaling the Z values
     to fit the range of the current colormap.  Use ‘caxis’ and/or
     change the colormap to control the appearance.

     Optionally the color of the mesh can be specified independently of
     Z by supplying a color matrix, C.

     Any property/value pairs are passed directly to the underlying
     surface object.

     If the first argument HAX is an axes handle, then plot into this
     axes, rather than the current axes returned by ‘gca’.

     The optional return value H is a 2-element vector with a graphics
     handle to the created surface object and to the created contour
     plot.

     See also: Note: ezmeshc, Note: mesh, Note:
     meshz, Note: contour, *note surfc:
     XREFsurfc, Note: surface, *note meshgrid:
     XREFmeshgrid, Note: hidden, Note: shading,
     Note: colormap, Note: caxis.

 -- : meshz (X, Y, Z)
 -- : meshz (Z)
 -- : meshz (..., C)
 -- : meshz (..., PROP, VAL, ...)
 -- : meshz (HAX, ...)
 -- : H = meshz (...)
     Plot a 3-D wireframe mesh with a surrounding curtain.

     The wireframe mesh is plotted using rectangles.  The vertices of
     the rectangles [X, Y] are typically the output of ‘meshgrid’.  over
     a 2-D rectangular region in the x-y plane.  Z determines the height
     above the plane of each vertex.  If only a single Z matrix is
     given, then it is plotted over the meshgrid ‘X = 1:columns (Z), Y =
     1:rows (Z)’.  Thus, columns of Z correspond to different X values
     and rows of Z correspond to different Y values.

     The color of the mesh is computed by linearly scaling the Z values
     to fit the range of the current colormap.  Use ‘caxis’ and/or
     change the colormap to control the appearance.

     Optionally the color of the mesh can be specified independently of
     Z by supplying a color matrix, C.

     Any property/value pairs are passed directly to the underlying
     surface object.

     If the first argument HAX is an axes handle, then plot into this
     axes, rather than the current axes returned by ‘gca’.

     The optional return value H is a graphics handle to the created
     surface object.

     See also: Note: mesh, Note: meshc, Note:
     contour, Note: surf, *note surface:
     XREFsurface, Note: waterfall, *note meshgrid:
     XREFmeshgrid, Note: hidden, Note: shading,
     Note: colormap, Note: caxis.

 -- : hidden
 -- : hidden on
 -- : hidden off
 -- : MODE = hidden (...)
     Control mesh hidden line removal.

     When called with no argument the hidden line removal state is
     toggled.

     When called with one of the modes "on" or "off" the state is set
     accordingly.

     The optional output argument MODE is the current state.

     Hidden Line Removal determines what graphic objects behind a mesh
     plot are visible.  The default is for the mesh to be opaque and
     lines behind the mesh are not visible.  If hidden line removal is
     turned off then objects behind the mesh can be seen through the
     faces (openings) of the mesh, although the mesh grid lines are
     still opaque.

     See also: Note: mesh, Note: meshc, Note:
     meshz, Note: ezmesh, *note ezmeshc:
     XREFezmeshc, Note: trimesh, *note waterfall:
     XREFwaterfall.

 -- : surf (X, Y, Z)
 -- : surf (Z)
 -- : surf (..., C)
 -- : surf (..., PROP, VAL, ...)
 -- : surf (HAX, ...)
 -- : H = surf (...)
     Plot a 3-D surface mesh.

     The surface mesh is plotted using shaded rectangles.  The vertices
     of the rectangles [X, Y] are typically the output of ‘meshgrid’.
     over a 2-D rectangular region in the x-y plane.  Z determines the
     height above the plane of each vertex.  If only a single Z matrix
     is given, then it is plotted over the meshgrid ‘X = 1:columns (Z),
     Y = 1:rows (Z)’.  Thus, columns of Z correspond to different X
     values and rows of Z correspond to different Y values.

     The color of the surface is computed by linearly scaling the Z
     values to fit the range of the current colormap.  Use ‘caxis’
     and/or change the colormap to control the appearance.

     Optionally, the color of the surface can be specified independently
     of Z by supplying a color matrix, C.

     Any property/value pairs are passed directly to the underlying
     surface object.

     If the first argument HAX is an axes handle, then plot into this
     axes, rather than the current axes returned by ‘gca’.

     The optional return value H is a graphics handle to the created
     surface object.

     Note: The exact appearance of the surface can be controlled with
     the ‘shading’ command or by using ‘set’ to control surface object
     properties.

     See also: Note: ezsurf, Note: surfc, Note:
     surfl, Note: surfnorm, *note trisurf:
     XREFtrisurf, Note: contour, Note: mesh,
     Note: surface, Note: meshgrid, Note:
     hidden, Note: shading, *note colormap:
     XREFcolormap, Note: caxis.

 -- : surfc (X, Y, Z)
 -- : surfc (Z)
 -- : surfc (..., C)
 -- : surfc (..., PROP, VAL, ...)
 -- : surfc (HAX, ...)
 -- : H = surfc (...)
     Plot a 3-D surface mesh with underlying contour lines.

     The surface mesh is plotted using shaded rectangles.  The vertices
     of the rectangles [X, Y] are typically the output of ‘meshgrid’.
     over a 2-D rectangular region in the x-y plane.  Z determines the
     height above the plane of each vertex.  If only a single Z matrix
     is given, then it is plotted over the meshgrid ‘X = 1:columns (Z),
     Y = 1:rows (Z)’.  Thus, columns of Z correspond to different X
     values and rows of Z correspond to different Y values.

     The color of the surface is computed by linearly scaling the Z
     values to fit the range of the current colormap.  Use ‘caxis’
     and/or change the colormap to control the appearance.

     Optionally, the color of the surface can be specified independently
     of Z by supplying a color matrix, C.

     Any property/value pairs are passed directly to the underlying
     surface object.

     If the first argument HAX is an axes handle, then plot into this
     axes, rather than the current axes returned by ‘gca’.

     The optional return value H is a graphics handle to the created
     surface object.

     Note: The exact appearance of the surface can be controlled with
     the ‘shading’ command or by using ‘set’ to control surface object
     properties.

     See also: Note: ezsurfc, Note: surf, Note:
     surfl, Note: surfnorm, *note trisurf:
     XREFtrisurf, Note: contour, Note: mesh,
     Note: surface, Note: meshgrid, Note:
     hidden, Note: shading, *note colormap:
     XREFcolormap, Note: caxis.

 -- : surfl (Z)
 -- : surfl (X, Y, Z)
 -- : surfl (..., LSRC)
 -- : surfl (X, Y, Z, LSRC, P)
 -- : surfl (..., "cdata")
 -- : surfl (..., "light")
 -- : surfl (HAX, ...)
 -- : H = surfl (...)
     Plot a 3-D surface using shading based on various lighting models.

     The surface mesh is plotted using shaded rectangles.  The vertices
     of the rectangles [X, Y] are typically the output of ‘meshgrid’.
     over a 2-D rectangular region in the x-y plane.  Z determines the
     height above the plane of each vertex.  If only a single Z matrix
     is given, then it is plotted over the meshgrid ‘X = 1:columns (Z),
     Y = 1:rows (Z)’.  Thus, columns of Z correspond to different X
     values and rows of Z correspond to different Y values.

     The default lighting mode "cdata", changes the cdata property of
     the surface object to give the impression of a lighted surface.
     *Warning:* The alternative mode "light" mode which creates a light
     object to illuminate the surface is not implemented (yet).

     The light source location can be specified using LSRC.  It can be
     given as a 2-element vector [azimuth, elevation] in degrees, or as
     a 3-element vector [lx, ly, lz].  The default value is rotated 45
     degrees counterclockwise to the current view.

     The material properties of the surface can specified using a
     4-element vector P = [AM D SP EXP] which defaults to P = [0.55 0.6
     0.4 10].

     "AM" strength of ambient light

     "D" strength of diffuse reflection

     "SP" strength of specular reflection

     "EXP" specular exponent

     If the first argument HAX is an axes handle, then plot into this
     axes, rather than the current axes returned by ‘gca’.

     The optional return value H is a graphics handle to the created
     surface object.

     Example:

          colormap (bone (64));
          surfl (peaks);
          shading interp;

     See also: Note: diffuse, Note: specular,
     Note: surf, Note: shading, *note colormap:
     XREFcolormap, Note: caxis.

 -- : surfnorm (X, Y, Z)
 -- : surfnorm (Z)
 -- : surfnorm (..., PROP, VAL, ...)
 -- : surfnorm (HAX, ...)
 -- : [NX, NY, NZ] = surfnorm (...)
     Find the vectors normal to a meshgridded surface.

     If X and Y are vectors, then a typical vertex is (X(j), Y(i),
     Z(i,j)).  Thus, columns of Z correspond to different X values and
     rows of Z correspond to different Y values.  If only a single input
     Z is given then X is taken to be ‘1:columns (Z)’ and Y is ‘1:rows
     (Z)’.

     If no return arguments are requested, a surface plot with the
     normal vectors to the surface is plotted.

     Any property/value input pairs are assigned to the surface object.

     If the first argument HAX is an axes handle, then plot into this
     axes, rather than the current axes returned by ‘gca’.

     If output arguments are requested then the components of the normal
     vectors are returned in NX, NY, and NZ and no plot is made.  The
     normal vectors are unnormalized (magnitude != 1).  To normalize,
     use

          len = sqrt (nx.^2 + ny.^2 + nz.^2);
          nx ./= len;  ny ./= len;  nz ./= len;

     An example of the use of ‘surfnorm’ is

          surfnorm (peaks (25));

     Algorithm: The normal vectors are calculated by taking the cross
     product of the diagonals of each of the quadrilateral faces in the
     meshgrid to find the normal vectors at the center of each face.
     Next, for each meshgrid point the four nearest normal vectors are
     averaged to obtain the final normal to the surface at the meshgrid
     point.

     For surface objects, the "VertexNormals" property contains
     equivalent information, except possibly near the boundary of the
     surface where different interpolation schemes may yield slightly
     different values.

     See also: Note: isonormals, *note quiver3:
     XREFquiver3, Note: surf, Note: meshgrid.

 -- : FV = isosurface (V, ISOVAL)
 -- : FV = isosurface (V)
 -- : FV = isosurface (X, Y, Z, V, ISOVAL)
 -- : FV = isosurface (X, Y, Z, V)
 -- : FVC = isosurface (..., COL)
 -- : FV = isosurface (..., "noshare")
 -- : FV = isosurface (..., "verbose")
 -- : [F, V] = isosurface (...)
 -- : [F, V, C] = isosurface (...)
 -- : isosurface (...)

     Calculate isosurface of 3-D volume data.

     An isosurface connects points with the same value and is analogous
     to a contour plot, but in three dimensions.

     The input argument V is a three-dimensional array that contains
     data sampled over a volume.

     The input ISOVAL is a scalar that specifies the value for the
     isosurface.  If ISOVAL is omitted or empty, a "good" value for an
     isosurface is determined from V.

     When called with a single output argument ‘isosurface’ returns a
     structure array FV that contains the fields FACES and VERTICES
     computed at the points ‘[X, Y, Z] = meshgrid (1:l, 1:m, 1:n)’ where
     ‘[l, m, n] = size (V)’.  The output FV can be used directly as
     input to the ‘patch’ function.

     If called with additional input arguments X, Y, and Z that are
     three-dimensional arrays with the same size as V or vectors with
     lengths corresponding to the dimensions of V, then the volume data
     is taken at the specified points.  If X, Y, or Z are empty, the
     grid corresponds to the indices (‘1:n’) in the respective direction
     (Note: meshgrid.).

     The optional input argument COL, which is a three-dimensional array
     of the same size as V, specifies coloring of the isosurface.  The
     color data is interpolated, as necessary, to match ISOVAL.  The
     output structure array, in this case, has the additional field
     FACEVERTEXCDATA.

     If given the string input argument "noshare", vertices may be
     returned multiple times for different faces.  The default behavior
     is to eliminate vertices shared by adjacent faces with ‘unique’
     which may be time consuming.

     The string input argument "verbose" is supported for MATLAB
     compatibility, but has no effect.

     Any string arguments must be passed after the other arguments.

     If called with two or three output arguments, return the
     information about the faces F, vertices V, and color data C as
     separate arrays instead of a single structure array.

     If called with no output argument, the isosurface geometry is
     directly plotted with the ‘patch’ command and a light object is
     added to the axes if not yet present.

     For example,

          [x, y, z] = meshgrid (1:5, 1:5, 1:5);
          v = rand (5, 5, 5);
          isosurface (x, y, z, v, .5);

     will directly draw a random isosurface geometry in a graphics
     window.

     An example of an isosurface geometry with different additional
     coloring:

          N = 15;    # Increase number of vertices in each direction
          iso = .4;  # Change isovalue to .1 to display a sphere
          lin = linspace (0, 2, N);
          [x, y, z] = meshgrid (lin, lin, lin);
          v = abs ((x-.5).^2 + (y-.5).^2 + (z-.5).^2);
          figure ();

          subplot (2,2,1); view (-38, 20);
          [f, vert] = isosurface (x, y, z, v, iso);
          p = patch ("Faces", f, "Vertices", vert, "EdgeColor", "none");
          pbaspect ([1 1 1]);
          isonormals (x, y, z, v, p)
          set (p, "FaceColor", "green", "FaceLighting", "gouraud");
          light ("Position", [1 1 5]);

          subplot (2,2,2); view (-38, 20);
          p = patch ("Faces", f, "Vertices", vert, "EdgeColor", "blue");
          pbaspect ([1 1 1]);
          isonormals (x, y, z, v, p)
          set (p, "FaceColor", "none", "EdgeLighting", "gouraud");
          light ("Position", [1 1 5]);

          subplot (2,2,3); view (-38, 20);
          [f, vert, c] = isosurface (x, y, z, v, iso, y);
          p = patch ("Faces", f, "Vertices", vert, "FaceVertexCData", c, ...
                     "FaceColor", "interp", "EdgeColor", "none");
          pbaspect ([1 1 1]);
          isonormals (x, y, z, v, p)
          set (p, "FaceLighting", "gouraud");
          light ("Position", [1 1 5]);

          subplot (2,2,4); view (-38, 20);
          p = patch ("Faces", f, "Vertices", vert, "FaceVertexCData", c, ...
                     "FaceColor", "interp", "EdgeColor", "blue");
          pbaspect ([1 1 1]);
          isonormals (x, y, z, v, p)
          set (p, "FaceLighting", "gouraud");
          light ("Position", [1 1 5]);

     See also: Note: isonormals, *note isocolors:
     XREFisocolors, Note: isocaps, *note smooth3:
     XREFsmooth3, Note: reducevolume, Note:
     reducepatch, Note: patch.

 -- : VN = isonormals (VAL, VERT)
 -- : VN = isonormals (VAL, HP)
 -- : VN = isonormals (X, Y, Z, VAL, VERT)
 -- : VN = isonormals (X, Y, Z, VAL, HP)
 -- : VN = isonormals (..., "negate")
 -- : isonormals (VAL, HP)
 -- : isonormals (X, Y, Z, VAL, HP)
 -- : isonormals (..., "negate")

     Calculate normals to an isosurface.

     The vertex normals VN are calculated from the gradient of the
     3-dimensional array VAL (size: lxmxn) containing the data for an
     isosurface geometry.  The normals point towards smaller values in
     VAL.

     If called with one output argument VN, and the second input
     argument VERT holds the vertices of an isosurface, then the normals
     VN are calculated at the vertices VERT on a grid given by ‘[x, y,
     z] = meshgrid (1:l, 1:m, 1:n)’.  The output argument VN has the
     same size as VERT and can be used to set the "VertexNormals"
     property of the corresponding patch.

     If called with additional input arguments X, Y, and Z, which are
     3-dimensional arrays with the same size as VAL, then the volume
     data is taken at these points.  Instead of the vertex data VERT, a
     patch handle HP can be passed to the function.

     If the last input argument is the string "negate", compute the
     reverse vector normals of an isosurface geometry (i.e., pointed
     towards larger values in VAL).

     If no output argument is given, the property "VertexNormals" of the
     patch associated with the patch handle HP is changed directly.

     See also: Note: isosurface, *note isocolors:
     XREFisocolors, Note: smooth3.

 -- : FVC = isocaps (V, ISOVAL)
 -- : FVC = isocaps (V)
 -- : FVC = isocaps (X, Y, Z, V, ISOVAL)
 -- : FVC = isocaps (X, Y, Z, V)
 -- : FVC = isocaps (..., WHICH_CAPS)
 -- : FVC = isocaps (..., WHICH_PLANE)
 -- : FVC = isocaps (..., "verbose")
 -- : [FACES, VERTICES, FVCDATA] = isocaps (...)
 -- : isocaps (...)

     Create end-caps for isosurfaces of 3-D data.

     This function places caps at the open ends of isosurfaces.

     The input argument V is a three-dimensional array that contains
     data sampled over a volume.

     The input ISOVAL is a scalar that specifies the value for the
     isosurface.  If ISOVAL is omitted or empty, a "good" value for an
     isosurface is determined from V.

     When called with a single output argument, ‘isocaps’ returns a
     structure array FVC with the fields: ‘faces’, ‘vertices’, and
     ‘facevertexcdata’.  The results are computed at the points ‘[X, Y,
     Z] = meshgrid (1:l, 1:m, 1:n)’ where ‘[l, m, n] = size (V)’.  The
     output FVC can be used directly as input to the ‘patch’ function.

     If called with additional input arguments X, Y, and Z that are
     three-dimensional arrays with the same size as V or vectors with
     lengths corresponding to the dimensions of V, then the volume data
     is taken at the specified points.  If X, Y, or Z are empty, the
     grid corresponds to the indices (‘1:n’) in the respective direction
     (Note: meshgrid.).

     The optional parameter WHICH_CAPS can have one of the following
     string values which defines how the data will be enclosed:

     "above", "a" (default)
          for end-caps that enclose the data above ISOVAL.

     "below", "b"
          for end-caps that enclose the data below ISOVAL.

     The optional parameter WHICH_PLANE can have one of the following
     string values to define which end-cap should be drawn:

     "all" (default)
          for all of the end-caps.

     "xmin"
          for end-caps at the lower x-plane of the data.

     "xmax"
          for end-caps at the upper x-plane of the data.

     "ymin"
          for end-caps at the lower y-plane of the data.

     "ymax"
          for end-caps at the upper y-plane of the data.

     "zmin"
          for end-caps at the lower z-plane of the data.

     "zmax"
          for end-caps at the upper z-plane of the data.

     The string input argument "verbose" is supported for MATLAB
     compatibility, but has no effect.

     If called with two or three output arguments, the data for faces
     FACES, vertices VERTICES, and the color data FACEVERTEXCDATA are
     returned in separate arrays instead of a single structure.

     If called with no output argument, the end-caps are drawn directly
     in the current figure with the ‘patch’ command.

     See also: Note: isosurface, *note isonormals:
     XREFisonormals, Note: patch.

 -- : CDAT = isocolors (C, V)
 -- : CDAT = isocolors (X, Y, Z, C, V)
 -- : CDAT = isocolors (X, Y, Z, R, G, B, V)
 -- : CDAT = isocolors (R, G, B, V)
 -- : CDAT = isocolors (..., P)
 -- : isocolors (...)

     Compute isosurface colors.

     If called with one output argument, and the first input argument C
     is a three-dimensional array that contains indexed color values,
     and the second input argument V are the vertices of an isosurface
     geometry, then return a matrix CDAT with color data information for
     the geometry at computed points ‘[x, y, z] = meshgrid (1:l, 1:m,
     1:n)’.  The output argument CDAT can be used to manually set the
     "FaceVertexCData" property of an isosurface patch object.

     If called with additional input arguments X, Y and Z which are
     three-dimensional arrays of the same size as C then the color data
     is taken at those specified points.

     Instead of indexed color data C, ‘isocolors’ can also be called
     with RGB values R, G, B.  If input arguments X, Y, Z are not given
     then ‘meshgrid’ computed values are used.

     Optionally, a patch handle P can be given as the last input
     argument to all function call variations and the vertex data will
     be extracted from the isosurface patch object.  Finally, if no
     output argument is given then the colors of the patch given by the
     patch handle P are changed.

     See also: Note: isosurface, *note isonormals:
     XREFisonormals.

 -- : SMOOTHED_DATA = smooth3 (DATA)
 -- : SMOOTHED_DATA = smooth3 (DATA, METHOD)
 -- : SMOOTHED_DATA = smooth3 (DATA, METHOD, SZ)
 -- : SMOOTHED_DATA = smooth3 (DATA, METHOD, SZ, STD_DEV)
     Smooth values of 3-dimensional matrix DATA.

     This function can be used, for example, to reduce the impact of
     noise in DATA before calculating isosurfaces.

     DATA must be a non-singleton 3-dimensional matrix.  The smoothed
     data from this matrix is returned in SMOOTHED_DATA which is of the
     same size as DATA.

     The option input METHOD determines which convolution kernel is used
     for the smoothing process.  Possible choices:

     "box", "b" (default)
          to use a convolution kernel with sharp edges.

     "gaussian", "g"
          to use a convolution kernel that is represented by a
          non-correlated trivariate normal distribution function.

     SZ is either a vector of 3 elements representing the size of the
     convolution kernel in x-, y- and z-direction or a scalar, in which
     case the same size is used in all three dimensions.  The default
     value is 3.

     When METHOD is "gaussian", STD_DEV defines the standard deviation
     of the trivariate normal distribution function.  STD_DEV is either
     a vector of 3 elements representing the standard deviation of the
     Gaussian convolution kernel in x-, y- and z-directions or a scalar,
     in which case the same value is used in all three dimensions.  The
     default value is 0.65.

     See also: Note: isosurface, *note isonormals:
     XREFisonormals, Note: patch.

 -- : [NX, NY, NZ, NV] = reducevolume (V, R)
 -- : [NX, NY, NZ, NV] = reducevolume (X, Y, Z, V, R)
 -- : NV = reducevolume (...)

     Reduce the volume of the dataset in V according to the values in R.

     V is a matrix that is non-singleton in the first 3 dimensions.

     R can either be a vector of 3 elements representing the reduction
     factors in the x-, y-, and z-directions or a scalar, in which case
     the same reduction factor is used in all three dimensions.

     ‘reducevolume’ reduces the number of elements of V by taking only
     every R-th element in the respective dimension.

     Optionally, X, Y, and Z can be supplied to represent the set of
     coordinates of V.  They can either be matrices of the same size as
     V or vectors with sizes according to the dimensions of V, in which
     case they are expanded to matrices (Note: meshgrid.).

     If ‘reducevolume’ is called with two arguments then X, Y, and Z are
     assumed to match the respective indices of V.

     The reduced matrix is returned in NV.

     Optionally, the reduced set of coordinates are returned in NX, NY,
     and NZ, respectively.

     Examples:

          V = reshape (1:6*8*4, [6 8 4]);
          NV = reducevolume (V, [4 3 2]);

          V = reshape (1:6*8*4, [6 8 4]);
          X = 1:3:24;  Y = -14:5:11;  Z = linspace (16, 18, 4);
          [NX, NY, NZ, NV] = reducevolume (X, Y, Z, V, [4 3 2]);

     See also: Note: isosurface, *note isonormals:
     XREFisonormals.

 -- : REDUCED_FV = reducepatch (FV)
 -- : REDUCED_FV = reducepatch (FACES, VERTICES)
 -- : REDUCED_FV = reducepatch (PATCH_HANDLE)
 -- : reducepatch (PATCH_HANDLE)
 -- : REDUCED_FV = reducepatch (..., REDUCTION_FACTOR)
 -- : REDUCED_FV = reducepatch (..., "fast")
 -- : REDUCED_FV = reducepatch (..., "verbose")
 -- : [REDUCED_FACES, REDUCES_VERTICES] = reducepatch (...)

     Reduce the number of faces and vertices in a patch object while
     retaining the overall shape of the patch.

     The input patch can be represented by a structure FV with the
     fields ‘faces’ and ‘vertices’, by two matrices FACES and VERTICES
     (see, e.g., the result of ‘isosurface’), or by a handle to a patch
     object PATCH_HANDLE (Note: patch.).

     The number of faces and vertices in the patch is reduced by
     iteratively collapsing the shortest edge of the patch to its
     midpoint (as discussed, e.g., here:
     <https://libigl.github.io/libigl/tutorial/tutorial.html#meshdecimation>).

     Currently, only patches consisting of triangles are supported.  The
     resulting patch also consists only of triangles.

     If ‘reducepatch’ is called with a handle to a valid patch
     PATCH_HANDLE, and without any output arguments, then the given
     patch is updated immediately.

     If the REDUCTION_FACTOR is omitted, the resulting structure
     REDUCED_FV includes approximately 50% of the faces of the original
     patch.  If REDUCTION_FACTOR is a fraction between 0 (excluded) and
     1 (excluded), a patch with approximately the corresponding fraction
     of faces is determined.  If REDUCTION_FACTOR is an integer greater
     than or equal to 1, the resulting patch has approximately
     REDUCTION_FACTOR faces.  Depending on the geometry of the patch,
     the resulting number of faces can differ from the given value of
     REDUCTION_FACTOR.  This is especially true when many shared
     vertices are detected.

     For the reduction, it is necessary that vertices of touching faces
     are shared.  Shared vertices are detected automatically.  This
     detection can be skipped by passing the optional string argument
     "fast".

     With the optional string arguments "verbose", additional status
     messages are printed to the command window.

     Any string input arguments must be passed after all other
     arguments.

     If called with one output argument, the reduced faces and vertices
     are returned in a structure REDUCED_FV with the fields ‘faces’ and
     ‘vertices’ (see the one output option of ‘isosurface’).

     If called with two output arguments, the reduced faces and vertices
     are returned in two separate matrices REDUCED_FACES and
     REDUCED_VERTICES.

     See also: Note: isosurface, *note isonormals:
     XREFisonormals, Note: reducevolume, *note patch:
     XREFpatch.

 -- : shrinkfaces (P, SF)
 -- : NFV = shrinkfaces (P, SF)
 -- : NFV = shrinkfaces (FV, SF)
 -- : NFV = shrinkfaces (F, V, SF)
 -- : [NF, NV] = shrinkfaces (...)

     Reduce the size of faces in a patch by the shrink factor SF.

     The patch object can be specified by a graphics handle (P), a patch
     structure (FV) with the fields "faces" and "vertices", or as two
     separate matrices (F, V) of faces and vertices.

     The shrink factor SF is a positive number specifying the percentage
     of the original area the new face will occupy.  If no factor is
     given the default is 0.3 (a reduction to 30% of the original size).
     A factor greater than 1.0 will result in the expansion of faces.

     Given a patch handle as the first input argument and no output
     parameters, perform the shrinking of the patch faces in place and
     redraw the patch.

     If called with one output argument, return a structure with fields
     "faces", "vertices", and "facevertexcdata" containing the data
     after shrinking.  This structure can be used directly as an input
     argument to the ‘patch’ function.

     *Caution:*: Performing the shrink operation on faces which are not
     convex can lead to undesirable results.

     Example: a triangulated 3/4 circle and the corresponding shrunken
     version.

          [phi r] = meshgrid (linspace (0, 1.5*pi, 16), linspace (1, 2, 4));
          tri = delaunay (phi(:), r(:));
          v = [r(:).*sin(phi(:)) r(:).*cos(phi(:))];
          clf ()
          p = patch ("Faces", tri, "Vertices", v, "FaceColor", "none");
          fv = shrinkfaces (p);
          patch (fv)
          axis equal
          grid on

     See also: Note: patch.

 -- : diffuse (SX, SY, SZ, LV)
     Calculate the diffuse reflection strength of a surface defined by
     the normal vector elements SX, SY, SZ.

     The light source location vector LV can be given as a 2-element
     vector [azimuth, elevation] in degrees or as a 3-element vector [x,
     y, z].

     See also: Note: specular, Note: surfl.

 -- : specular (SX, SY, SZ, LV, VV)
 -- : specular (SX, SY, SZ, LV, VV, SE)
     Calculate the specular reflection strength of a surface defined by
     the normal vector elements SX, SY, SZ using Phong’s approximation.

     The light source location and viewer location vectors are specified
     using parameters LV and VV respectively.  The location vectors can
     given as 2-element vectors [azimuth, elevation] in degrees or as
     3-element vectors [x, y, z].

     An optional sixth argument specifies the specular exponent (spread)
     SE.  If not given, SE defaults to 10.

     See also: Note: diffuse, Note: surfl.

 -- : lighting (TYPE)
 -- : lighting (HAX, TYPE)
     Set the lighting of patch or surface graphic objects.

     Valid arguments for TYPE are

     "flat"
          Draw objects with faceted lighting effects.

     "gouraud"
          Draw objects with linear interpolation of the lighting effects
          between the vertices.

     "none"
          Draw objects without light and shadow effects.

     If the first argument HAX is an axes handle, then change the
     lighting effects of objects in this axes, rather than the current
     axes returned by ‘gca’.

     The lighting effects are only visible if at least one light object
     is present and visible in the same axes.

     See also: Note: light, Note: fill, *note mesh:
     XREFmesh, Note: patch, Note: pcolor, Note:
     surf, Note: surface, *note shading:
     XREFshading.

 -- : material shiny
 -- : material dull
 -- : material metal
 -- : material default
 -- : material ([AS, DS, SS])
 -- : material ([AS, DS, SS, SE])
 -- : material ([AS, DS, SS, SE, SCR])
 -- : material (HLIST, ...)
 -- : MTYPES = material ()
 -- : REFL_PROPS = material (MTYPE_STRING)
     Set reflectance properties for the lighting of surfaces and
     patches.

     This function changes the ambient, diffuse, and specular strengths,
     as well as the specular exponent and specular color reflectance, of
     all ‘patch’ and ‘surface’ objects in the current axes.  This can be
     used to simulate, to some extent, the reflectance properties of
     certain materials when used with ‘light’.

     When called with a string, the aforementioned properties are set
     according to the values in the following table:

      MTYPE          ambient-    diffuse-    specular-   specular-   specular-
                     strength    strength    strength    exponent    color-
                                                                     reflectance
     -----------------------------------------------------------------------------
      "shiny"        0.3         0.6         0.9         20          1.0
      "dull"         0.3         0.8         0.0         10          1.0
      "metal"        0.3         0.3         1.0         25          0.5
      "default"      "default"   "default"   "default"   "default"   "default"

     When called with a vector of three elements, the ambient, diffuse,
     and specular strengths of all ‘patch’ and ‘surface’ objects in the
     current axes are updated.  An optional fourth vector element
     updates the specular exponent, and an optional fifth vector element
     updates the specular color reflectance.

     A list of graphic handles can also be passed as the first argument.
     In this case, the properties of these handles and all child ‘patch’
     and ‘surface’ objects will be updated.

     Additionally, ‘material’ can be called with a single output
     argument.  If called without input arguments, a column cell vector
     MTYPES with the strings for all available materials is returned.
     If the one input argument MTYPE_STRING is the name of a material, a
     1x5 cell vector REFL_PROPS with the reflectance properties of that
     material is returned.  In both cases, no graphic properties are
     changed.

     See also: Note: light, Note: fill, *note mesh:
     XREFmesh, Note: patch, Note: pcolor, Note:
     surf, Note: surface.

 -- : camlight
 -- : camlight right
 -- : camlight left
 -- : camlight headlight
 -- : camlight (AZ, EL)
 -- : camlight (..., STYLE)
 -- : camlight (HL, ...)
 -- : H = camlight (...)
     Add a light object to a figure using a simple interface.

     When called with no arguments, a light object is added to the
     current plot and is placed slightly above and to the right of the
     camera’s current position: this is equivalent to ‘camlight right’.
     The commands ‘camlight left’ and ‘camlight headlight’ behave
     similarly with the placement being either left of the camera
     position or centered on the camera position.

     For more control, the light position can be specified by an
     azimuthal rotation AZ and an elevation angle EL, both in degrees,
     relative to the current properties of the camera.

     The optional string STYLE specifies whether the light is a local
     point source ("local", the default) or placed at infinite distance
     ("infinite").

     If the first argument HL is a handle to a light object, then act on
     this light object rather than creating a new object.

     The optional return value H is a graphics handle to the light
     object.  This can be used to move or further change properties of
     the light object.

     Examples:

     Add a light object to a plot

          sphere (36);
          camlight

     Position the light source exactly

          camlight (45, 30);

     Here the light is first pitched upwards (Note: camup.)
     from the camera position (Note: campos.) by 30 degrees.
     It is then yawed by 45 degrees to the right.  Both rotations are
     centered around the camera target (*note camtarget:
     XREFcamtarget.).

     Return a handle to further manipulate the light object

          clf
          sphere (36);
          hl = camlight ("left");
          set (hl, "color", "r");

     See also: Note: light.

 -- : [XX, YY] = meshgrid (X, Y)
 -- : [XX, YY, ZZ] = meshgrid (X, Y, Z)
 -- : [XX, YY] = meshgrid (X)
 -- : [XX, YY, ZZ] = meshgrid (X)
     Given vectors of X and Y coordinates, return matrices XX and YY
     corresponding to a full 2-D grid.

     The rows of XX are copies of X, and the columns of YY are copies of
     Y.  If Y is omitted, then it is assumed to be the same as X.

     If the optional Z input is given, or ZZ is requested, then the
     output will be a full 3-D grid.  If Z is omitted and ZZ is
     requested, it is assumed to be the same as Y.

     ‘meshgrid’ is most frequently used to produce input for a 2-D or
     3-D function that will be plotted.  The following example creates a
     surface plot of the “sombrero” function.

          f = @(x,y) sin (sqrt (x.^2 + y.^2)) ./ sqrt (x.^2 + y.^2);
          range = linspace (-8, 8, 41);
          [X, Y] = meshgrid (range, range);
          Z = f (X, Y);
          surf (X, Y, Z);

     Programming Note: ‘meshgrid’ is restricted to 2-D or 3-D grid
     generation.  The ‘ndgrid’ function will generate 1-D through N-D
     grids.  However, the functions are not completely equivalent.  If X
     is a vector of length M and Y is a vector of length N, then
     ‘meshgrid’ will produce an output grid which is NxM.  ‘ndgrid’ will
     produce an output which is MxN (transpose) for the same input.
     Some core functions expect ‘meshgrid’ input and others expect
     ‘ndgrid’ input.  Check the documentation for the function in
     question to determine the proper input format.

     See also: Note: ndgrid, Note: mesh, Note:
     contour, Note: surf.

 -- : [Y1, Y2, ..., Yn] = ndgrid (X1, X2, ..., Xn)
 -- : [Y1, Y2, ..., Yn] = ndgrid (X)
     Given n vectors X1, ..., Xn, ‘ndgrid’ returns n arrays of dimension
     n.

     The elements of the i-th output argument contains the elements of
     the vector Xi repeated over all dimensions different from the i-th
     dimension.  Calling ndgrid with only one input argument X is
     equivalent to calling ndgrid with all n input arguments equal to X:

     [Y1, Y2, ..., Yn] = ndgrid (X, ..., X)

     Programming Note: ‘ndgrid’ is very similar to the function
     ‘meshgrid’ except that the first two dimensions are transposed in
     comparison to ‘meshgrid’.  Some core functions expect ‘meshgrid’
     input and others expect ‘ndgrid’ input.  Check the documentation
     for the function in question to determine the proper input format.

     See also: Note: meshgrid.

 -- : plot3 (X, Y, Z)
 -- : plot3 (X, Y, Z, PROP, VALUE, ...)
 -- : plot3 (X, Y, Z, FMT)
 -- : plot3 (X, CPLX)
 -- : plot3 (CPLX)
 -- : plot3 (HAX, ...)
 -- : H = plot3 (...)
     Produce 3-D plots.

     Many different combinations of arguments are possible.  The
     simplest form is

          plot3 (X, Y, Z)

     in which the arguments are taken to be the vertices of the points
     to be plotted in three dimensions.  If all arguments are vectors of
     the same length, then a single continuous line is drawn.  If all
     arguments are matrices, then each column of is treated as a
     separate line.  No attempt is made to transpose the arguments to
     make the number of rows match.

     If only two arguments are given, as

          plot3 (X, CPLX)

     the real and imaginary parts of the second argument are used as the
     Y and Z coordinates, respectively.

     If only one argument is given, as

          plot3 (CPLX)

     the real and imaginary parts of the argument are used as the Y and
     Z values, and they are plotted versus their index.

     Arguments may also be given in groups of three as

          plot3 (X1, Y1, Z1, X2, Y2, Z2, ...)

     in which each set of three arguments is treated as a separate line
     or set of lines in three dimensions.

     To plot multiple one- or two-argument groups, separate each group
     with an empty format string, as

          plot3 (X1, C1, "", C2, "", ...)

     Multiple property-value pairs may be specified which will affect
     the line objects drawn by ‘plot3’.  If the FMT argument is supplied
     it will format the line objects in the same manner as ‘plot’.

     If the first argument HAX is an axes handle, then plot into this
     axes, rather than the current axes returned by ‘gca’.

     The optional return value H is a graphics handle to the created
     plot.

     Example:

          z = [0:0.05:5];
          plot3 (cos (2*pi*z), sin (2*pi*z), z, ";helix;");
          plot3 (z, exp (2i*pi*z), ";complex sinusoid;");

     See also: Note: ezplot3, Note: plot.

 -- : view (AZIMUTH, ELEVATION)
 -- : view ([AZIMUTH ELEVATION])
 -- : view ([X Y Z])
 -- : view (2)
 -- : view (3)
 -- : view (HAX, ...)
 -- : [AZIMUTH, ELEVATION] = view ()
     Query or set the viewpoint for the current axes.

     The parameters AZIMUTH and ELEVATION can be given as two arguments
     or as 2-element vector.  The viewpoint can also be specified with
     Cartesian coordinates X, Y, and Z.

     The call ‘view (2)’ sets the viewpoint to AZIMUTH = 0 and
     ELEVATION = 90, which is the default for 2-D graphs.

     The call ‘view (3)’ sets the viewpoint to AZIMUTH = -37.5 and
     ELEVATION = 30, which is the default for 3-D graphs.

     If the first argument HAX is an axes handle, then operate on this
     axes rather than the current axes returned by ‘gca’.

     If no inputs are given, return the current AZIMUTH and ELEVATION.

 -- : camlookat ()
 -- : camlookat (H)
 -- : camlookat (HANDLE_LIST)
 -- : camlookat (HAX)
     Move the camera and adjust its properties to look at objects.

     When the input is a handle H, the camera is set to point toward the
     center of the bounding box of H.  The camera’s position is adjusted
     so the bounding box approximately fills the field of view.

     This command fixes the camera’s viewing direction (‘camtarget() -
     campos()’), camera up vector (Note: camup.) and viewing
     angle (Note: camva.).  The camera target (Note:
     camtarget.) and camera position (*note campos:
     XREFcampos.) are changed.

     If the argument is a list HANDLE_LIST, then a single bounding box
     for all the objects is computed and the camera is then adjusted as
     above.

     If the argument is an axis object HAX, then the children of the
     axis are used as HANDLE_LIST.  When called with no inputs, it uses
     the current axis (Note: gca.).

     See also: Note: camorbit, Note: camzoom,
     Note: camroll.

 -- : P = campos ()
 -- : campos ([X Y Z])
 -- : MODE = campos ("mode")
 -- : campos (MODE)
 -- : campos (AX, ...)
     Set or get the camera position.

     The default camera position is determined automatically based on
     the scene.  For example, to get the camera position:

          hf = figure();
          peaks()
          p = campos ()
            ⇒ p =
                -27.394  -35.701   64.079

     We can then move the camera further up the z-axis:

          campos (p + [0 0 10])
          campos ()
            ⇒ ans =
                -27.394  -35.701   74.079

     Having made that change, the camera position MODE is now manual:

          campos ("mode")
            ⇒ manual

     We can set it back to automatic:

          campos ("auto")
          campos ()
            ⇒ ans =
                -27.394  -35.701   64.079
          close (hf)

     By default, these commands affect the current axis; alternatively,
     an axis can be specified by the optional argument AX.

     See also: Note: camup, Note: camtarget,
     Note: camva.

 -- : camorbit (THETA, PHI)
 -- : camorbit (THETA, PHI, COORSYS)
 -- : camorbit (THETA, PHI, COORSYS, DIR)
 -- : camorbit (THETA, PHI, "data")
 -- : camorbit (THETA, PHI, "data", "z")
 -- : camorbit (THETA, PHI, "data", "x")
 -- : camorbit (THETA, PHI, "data", "y")
 -- : camorbit (THETA, PHI, "data", [X Y Z])
 -- : camorbit (THETA, PHI, "camera")
 -- : camorbit (HAX, ...)
     Rotate the camera up/down and left/right around its target.

     Move the camera PHI degrees up and THETA degrees to the right, as
     if it were in an orbit around its target.  Example:

          sphere ()
          camorbit (30, 20)

     These rotations are centered around the camera target (Note:
     camtarget.).  First the camera position is pitched
     up or down by rotating it PHI degrees around an axis orthogonal to
     both the viewing direction (specifically ‘camtarget() - campos()’)
     and the camera “up vector” (Note: camup.).  Example:

          camorbit (0, 20)

     The second rotation depends on the coordinate system COORSYS and
     direction DIR inputs.  The default for COORSYS is "data".  In this
     case, the camera is yawed left or right by rotating it THETA
     degrees around an axis specified by DIR.  The default for DIR is
     "z", corresponding to the vector ‘[0, 0, 1]’.  Example:

          camorbit (30, 0)

     When COORSYS is set to "camera", the camera is moved left or right
     by rotating it around an axis parallel to the camera up vector
     (Note: camup.).  The input DIR should not be specified
     in this case.  Example:

          camorbit (30, 0, "camera")

     (Note: the rotation by PHI is unaffected by "camera".)

     The ‘camorbit’ command modifies two camera properties: Note:
     campos. and Note: camup.

     By default, this command affects the current axis; alternatively,
     an axis can be specified by the optional argument HAX.

     See also: Note: camzoom, Note: camroll,
     Note: camlookat.

 -- : camroll (THETA)
 -- : camroll (AX, THETA)
     Roll the camera.

     Roll the camera clockwise by THETA degrees.  For example, the
     following command will roll the camera by 30 degrees clockwise (to
     the right); this will cause the scene to appear to roll by 30
     degrees to the left:

          peaks ()
          camroll (30)

     Roll the camera back:

          camroll (-30)

     The following command restores the default camera roll:

          camup ("auto")

     By default, these commands affect the current axis; alternatively,
     an axis can be specified by the optional argument AX.

     See also: Note: camzoom, Note: camorbit,
     Note: camlookat, Note: camup.

 -- : T = camtarget ()
 -- : camtarget ([X Y Z])
 -- : MODE = camtarget ("mode")
 -- : camtarget (MODE)
 -- : camtarget (AX, ...)
     Set or get where the camera is pointed.

     The camera target is a point in space where the camera is pointing.
     Usually, it is determined automatically based on the scene:

          hf = figure();
          sphere (36)
          v = camtarget ()
            ⇒ v =
                0   0   0

     We can turn the camera to point at a new target:

          camtarget ([1 1 1])
          camtarget ()
            ⇒   1   1   1

     Having done so, the camera target MODE is manual:

          camtarget ("mode")
            ⇒ manual

     This means, for example, adding new objects to the scene will not
     retarget the camera:

          hold on;
          peaks ()
          camtarget ()
            ⇒   1   1   1

     We can reset it to be automatic:

          camtarget ("auto")
          camtarget ()
            ⇒   0   0   0.76426
          close (hf)

     By default, these commands affect the current axis; alternatively,
     an axis can be specified by the optional argument AX.

     See also: Note: campos, Note: camup, Note:
     camva.

 -- : UP = camup ()
 -- : camup ([X Y Z])
 -- : MODE = camup ("mode")
 -- : camup (MODE)
 -- : camup (AX, ...)
     Set or get the camera up vector.

     By default, the camera is oriented so that “up” corresponds to the
     positive z-axis:

          hf = figure ();
          sphere (36)
          v = camup ()
            ⇒ v =
                0   0   1

     Specifying a new “up vector” rolls the camera and sets the mode to
     manual:

          camup ([1 1 0])
          camup ()
            ⇒   1   1   0
          camup ("mode")
            ⇒ manual

     Modifying the up vector does not modify the camera target (Note:
     camtarget.).  Thus, the camera up vector might not
     be orthogonal to the direction of the camera’s view:

          camup ([1 2 3])
          dot (camup (), camtarget () - campos ())
            ⇒ 6...

     A consequence is that “pulling back” on the up vector does not
     pitch the camera view (as that would require changing the target).
     Setting the up vector is thus typically used only to roll the
     camera.  A more intuitive command for this purpose is Note:
     camroll.

     Finally, we can reset the up vector to automatic mode:

          camup ("auto")
          camup ()
            ⇒   0   0   1
          close (hf)

     By default, these commands affect the current axis; alternatively,
     an axis can be specified by the optional argument AX.

     See also: Note: campos, Note: camtarget,
     Note: camva.

 -- : A = camva ()
 -- : camva (A)
 -- : MODE = camva ("mode")
 -- : camva (MODE)
 -- : camva (AX, ...)
     Set or get the camera viewing angle.

     The camera has a viewing angle which determines how much can be
     seen.  By default this is:

          hf = figure();
          sphere (36)
          a = camva ()
            ⇒ a =  10.340

     To get a wider-angle view, we could double the viewing angle.  This
     will also set the mode to manual:

          camva (2*a)
          camva ("mode")
            ⇒ manual

     We can set it back to automatic:

          camva ("auto")
          camva ("mode")
            ⇒ auto
          camva ()
            ⇒ ans =  10.340
          close (hf)

     By default, these commands affect the current axis; alternatively,
     an axis can be specified by the optional argument AX.

     See also: Note: campos, Note: camtarget,
     Note: camup.

 -- : camzoom (ZF)
 -- : camzoom (AX, ZF)
     Zoom the camera in or out.

     A value of ZF larger than 1 “zooms in” such that the scene appears
     magnified:

          hf = figure ();
          sphere (36)
          camzoom (1.2)

     A value smaller than 1 “zooms out” so the camera can see more of
     the scene:

          camzoom (0.5)

     Technically speaking, zooming affects the “viewing angle”.  The
     following command resets to the default zoom:

          camva ("auto")
          close (hf)

     By default, these commands affect the current axis; alternatively,
     an axis can be specified by the optional argument AX.

     See also: Note: camroll, Note: camorbit,
     Note: camlookat, Note: camva.

 -- : slice (X, Y, Z, V, SX, SY, SZ)
 -- : slice (X, Y, Z, V, XI, YI, ZI)
 -- : slice (V, SX, SY, SZ)
 -- : slice (V, XI, YI, ZI)
 -- : slice (..., METHOD)
 -- : slice (HAX, ...)
 -- : H = slice (...)
     Plot slices of 3-D data/scalar fields.

     Each element of the 3-dimensional array V represents a scalar value
     at a location given by the parameters X, Y, and Z.  The parameters
     X, X, and Z are either 3-dimensional arrays of the same size as the
     array V in the "meshgrid" format or vectors.  The parameters XI,
     etc. respect a similar format to X, etc., and they represent the
     points at which the array VI is interpolated using interp3.  The
     vectors SX, SY, and SZ contain points of orthogonal slices of the
     respective axes.

     If X, Y, Z are omitted, they are assumed to be ‘x = 1:size (V, 2)’,
     ‘y = 1:size (V, 1)’ and ‘z = 1:size (V, 3)’.

     METHOD is one of:

     "nearest"
          Return the nearest neighbor.

     "linear"
          Linear interpolation from nearest neighbors.

     "cubic"
          Cubic interpolation from four nearest neighbors (not
          implemented yet).

     "spline"
          Cubic spline interpolation—smooth first and second derivatives
          throughout the curve.

     The default method is "linear".

     If the first argument HAX is an axes handle, then plot into this
     axes, rather than the current axes returned by ‘gca’.

     The optional return value H is a graphics handle to the created
     surface object.

     Examples:

          [x, y, z] = meshgrid (linspace (-8, 8, 32));
          v = sin (sqrt (x.^2 + y.^2 + z.^2)) ./ (sqrt (x.^2 + y.^2 + z.^2));
          slice (x, y, z, v, [], 0, []);

          [xi, yi] = meshgrid (linspace (-7, 7));
          zi = xi + yi;
          slice (x, y, z, v, xi, yi, zi);

     See also: Note: interp3, Note: surface,
     Note: pcolor.

 -- : ribbon (Y)
 -- : ribbon (X, Y)
 -- : ribbon (X, Y, WIDTH)
 -- : ribbon (HAX, ...)
 -- : H = ribbon (...)
     Draw a ribbon plot for the columns of Y vs.  X.

     If X is omitted, a vector containing the row numbers is assumed
     (‘1:rows (Y)’).  Alternatively, X can also be a vector with same
     number of elements as rows of Y in which case the same X is used
     for each column of Y.

     The optional parameter WIDTH specifies the width of a single ribbon
     (default is 0.75).

     If the first argument HAX is an axes handle, then plot into this
     axes, rather than the current axes returned by ‘gca’.

     The optional return value H is a vector of graphics handles to the
     surface objects representing each ribbon.

     See also: Note: surface, *note waterfall:
     XREFwaterfall.

 -- : shading (TYPE)
 -- : shading (HAX, TYPE)
     Set the shading of patch or surface graphic objects.

     Valid arguments for TYPE are

     "flat"
          Single colored patches with invisible edges.

     "faceted"
          Single colored patches with black edges.

     "interp"
          Colors between patch vertices are interpolated and the patch
          edges are invisible.

     If the first argument HAX is an axes handle, then plot into this
     axes, rather than the current axes returned by ‘gca’.

     See also: Note: fill, Note: mesh, *note patch:
     XREFpatch, Note: pcolor, Note: surf, Note:
     surface, Note: hidden, *note lighting:
     XREFlighting.

 -- : scatter3 (X, Y, Z)
 -- : scatter3 (X, Y, Z, S)
 -- : scatter3 (X, Y, Z, S, C)
 -- : scatter3 (..., STYLE)
 -- : scatter3 (..., "filled")
 -- : scatter3 (..., PROP, VAL)
 -- : scatter3 (HAX, ...)
 -- : H = scatter3 (...)
     Draw a 3-D scatter plot.

     A marker is plotted at each point defined by the coordinates in the
     vectors X, Y, and Z.

     The size of the markers is determined by S, which can be a scalar
     or a vector of the same length as X, Y, and Z.  If S is not given,
     or is an empty matrix, then a default value of 8 points is used.

     The color of the markers is determined by C, which can be a string
     defining a fixed color; a 3-element vector giving the red, green,
     and blue components of the color; a vector of the same length as X
     that gives a scaled index into the current colormap; or an Nx3
     matrix defining the RGB color of each marker individually.

     The marker to use can be changed with the STYLE argument, that is a
     string defining a marker in the same manner as the ‘plot’ command.
     If no marker is specified it defaults to "o" or circles.  If the
     argument "filled" is given then the markers are filled.

     Additional property/value pairs are passed directly to the
     underlying patch object.

     If the first argument HAX is an axes handle, then plot into this
     axes, rather than the current axes returned by ‘gca’.

     The optional return value H is a graphics handle to the hggroup
     object representing the points.

          [x, y, z] = peaks (20);
          scatter3 (x(:), y(:), z(:), [], z(:));

     See also: Note: scatter, Note: patch, Note:
     plot.

 -- : waterfall (X, Y, Z)
 -- : waterfall (Z)
 -- : waterfall (..., C)
 -- : waterfall (..., PROP, VAL, ...)
 -- : waterfall (HAX, ...)
 -- : H = waterfall (...)
     Plot a 3-D waterfall plot.

     A waterfall plot is similar to a ‘meshz’ plot except only mesh
     lines for the rows of Z (x-values) are shown.

     The wireframe mesh is plotted using rectangles.  The vertices of
     the rectangles [X, Y] are typically the output of ‘meshgrid’.  over
     a 2-D rectangular region in the x-y plane.  Z determines the height
     above the plane of each vertex.  If only a single Z matrix is
     given, then it is plotted over the meshgrid ‘X = 1:columns (Z), Y =
     1:rows (Z)’.  Thus, columns of Z correspond to different X values
     and rows of Z correspond to different Y values.

     The color of the mesh is computed by linearly scaling the Z values
     to fit the range of the current colormap.  Use ‘caxis’ and/or
     change the colormap to control the appearance.

     Optionally the color of the mesh can be specified independently of
     Z by supplying a color matrix, C.

     Any property/value pairs are passed directly to the underlying
     surface object.

     If the first argument HAX is an axes handle, then plot into this
     axes, rather than the current axes returned by ‘gca’.

     The optional return value H is a graphics handle to the created
     surface object.

     See also: Note: meshz, Note: mesh, Note:
     meshc, Note: contour, Note: surf,
     Note: surface, Note: ribbon, Note:
     meshgrid, Note: hidden, *note shading:
     XREFshading, Note: colormap, Note: caxis.

Aspect Ratio
Three-dimensional Function Plotting
Three-dimensional Geometric Shapes

automatically generated by info2www version 1.2.2.9