coneplot
Draws 3-D vectors of a vector field as cones.
Category: Graphics > 2-D and 3-D Plots
Syntax
coneplot(X, Y, Z, U, V, W, Cx, Cy, Cz)
Places cones at the points (Cx, Cy, Cz) of the field (U, V, W) defined on the grid (X, Y, Z).
h = coneplot(___)
Also returns the patch object.
Description
At each requested point the field is interpolated, and a cone is drawn pointing along the vector with a size proportional to its magnitude. Combine with camlight and lighting to give the cones volume.
Input arguments
X, Y, Z- Grid coordinates, as returned by
meshgrid. U, V, W- Components of the vector field on the grid.
Cx, Cy, Cz- Coordinates where the cones are placed.
Output arguments
h- A
Patchobject holding all the cones.
Example
Radial field
[X, Y, Z] = meshgrid(-2:2);
U = X; V = Y; W = Z;
[cx, cy, cz] = meshgrid(-1:1);
h = coneplot(X, Y, Z, U, V, W, cx, cy, cz);
disp(class(h))
view(3)
Output
matlab.graphics.primitive.Patch