| Contents | Index |
plot::Point2d(x, y) creates a two-dimensional point with the coordinates
.
plot::Point3d(x, y, z) creates a three-dimensional point with the coordinates
.
Calls:
plot::Point2d(x, y, <a = amin .. amax>, Options)
plot::Point2d([x, y], <a = amin .. amax>, Options)
plot::Point2d(matrix([x, y]), <a = amin .. amax>, Options)
plot::Point3d(x, y, z, <a = amin .. amax>, Options)
plot::Point3d([x, y, z], <a = amin .. amax>, Options)
plot::Point3d(matrix([x, y, z]), <a = amin .. amax>, Options)
Parameters:
|
x, y, z: |
arithmetical expressions |
See Also:
plot, plot::copy, plot::Polygon2d, plot::Polygon3d
Details:
plot::Point2d and plot::Point3d create graphical points in two and three dimensions, respectively.
Starting with MuPAD® 3.0 software, each type of graphical elements has a fixed dimension. Therefore, plot::Point2d and plot::Point3d are distinct, but very similar, types.
Example 1
We create three points:
p1 := plot::Point2d(1, 3, PointSize = 4*unit::mm);
p2 := plot::Point2d(2, 2, PointSize = 5*unit::mm);
p3 := plot::Point2d(3, 1, Color = RGB::Green,
PointSize = 6*unit::mm);
![]()
![]()
![]()
To have these points displayed, we use plot:
plot(p1, p2, p3)

It is possible to set global options directly in the call to plot:
plot(p1, p2, p3, PointStyle = FilledDiamonds)

These options are regarded as the new defaults. This implies that objects having an option set explicitly will silently ignore these options. The green point stays green:
plot(p1, p2, p3, PointStyle = FilledDiamonds,
PointColor = RGB::Red)

Example 2
The point position can be animated. As an example, we combine a point with a curve that traces the path of the point:
x := t -> sin(3*t);
y := t -> cos(5*t);
p := plot::Point2d([x(t), y(t)], t = 0..2*PI);
c := plot::Curve2d([x(t), y(t)], t = 0..tmax, tmax = 0..2*PI)
![]()
![]()
![]()
![]()
plot(c, p, PointSize = 3*unit::mm, LineWidth = 0.5*unit::mm)


Background:
For reasons of efficiency and clarity in the object browser, you should avoid generating large numbers of plot::Point2d and plot::Point3d objects. None of the domains in the plot package do. For alternatives, consider plot::PointList2d and plot::PointList3d.

Includes the most popular MATLAB recorded presentations with Q&A sessions led by MATLAB experts.
| © 1984-2012- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |