Next: , Previous: Multiple Plot Windows, Up: High-Level Plotting


15.2.6 Use of axis, line, and patch Functions

You can create axes, line, and patch objects directly using the axes, line, and patch functions. These objects become children of the current axes object.

— Function File: axes ()
— Function File: axes (property, value, ...)
— Function File: axes (h)

Create an axes object and return a handle to it.

— Function File: line ()
— Function File: line (x, y)
— Function File: line (x, y, z)
— Function File: line (x, y, z, property, value, ...)

Create line object from x and y and insert in current axes object. Return a handle (or vector of handles) to the line objects created.

Multiple property-value pairs may be specified for the line, but they must appear in pairs.

— Function File: patch ()
— Function File: patch (x, y, c)
— Function File: patch (x, y, z, c)
— Function File: patch (fv)
— Function File: patch ("Faces", f, "Vertices", v, ...)
— Function File: patch (..., prop, val)
— Function File: patch (h, ...)
— Function File: h = patch (...)

Create patch object from x and y with color c and insert in the current axes object. Return handle to patch object.

For a uniform colored patch, c can be given as an RGB vector, scalar value referring to the current colormap, or string value (for example, "r" or "red").

If passed a structure fv contain the fields "vertices", "faces" and optionally "facevertexcdata", create the patch based on these properties.

The optional return value h is a graphics handle to the created patch object.

See also: fill.

— Function File: fill (x, y, c)
— Function File: fill (x1, y1, c1, x2, y2, c2)
— Function File: fill (..., prop, val)
— Function File: fill (h, ...)
— Function File: h = fill (...)

Create one or more filled patch objects.

The optional return value h is an array of graphics handles to the created patch objects.

See also: patch.

— Function File: surface (x, y, z, c)
— Function File: surface (x, y, z)
— Function File: surface (z, c)
— Function File: surface (z)
— Function File: surface (..., prop, val)
— Function File: surface (h, ...)
— Function File: h = surface (...)

Plot a surface graphic object given matrices x, and y from meshgrid and a matrix z corresponding to the x and y coordinates of the 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 x and y are missing, they are constructed from size of the matrix z.

Any additional properties passed are assigned to the surface.

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

See also: surf, mesh, patch, line.