Skip to Main Content Skip to Search
Product Documentation

PointStylethe presentation style of points

PointStyle sets the graphical presentation style of points.

→ Examples

Attribute

Type

Value

See Also:

PointColor, PointSize, PointsVisible

Details:

Example 1

We plot 2D points in all available styles:

styles := [Circles, FilledCircles,
           Crosses, XCrosses,
           Diamonds, FilledDiamonds,
           Squares, FilledSquares,
           Stars]:
points := null():
for i from 1 to nops(styles) do
  points := points,
            plot::Point2d([i, i], PointStyle = styles[i],
                          Title = expr2text(styles[i]),
                          TitlePosition = [i + 0.3, i - 0.15]):
end_for:
plot(points, PointSize = 3*unit::mm, Axes = None,
     TitleAlignment = Left):

MuPAD graphics

delete styles, points, i:

Example 2

In 3D, the renderer only supports the point styles FilledCircles and FilledSquares:          

plot(plot::Point3d([-1, -1, 0], PointStyle = FilledCircles,
                   Title = "FilledCircles",
                   TitlePosition = [-1, -0.8, 0]),
     plot::Point3d([1, 1, 0], PointStyle = FilledSquares,
                   Title = "FilledSquares",
                   TitlePosition = [1, 1.2, 0]),
     PointSize = 3*unit::mm,
     ViewingBox = [-2..2, -2..2, 0..1],
     CameraDirection = [0, -1, 1000]):

MuPAD graphics

Example 3

We can access the PointStyle attribute from a point and change it:

p := plot::Point2d(1, 2):
p::PointStyle := Diamonds:
p::PointStyle

Diamonds

delete p:

  


Recommended Products

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