Skip to Main Content Skip to Search
Product Documentation

HorizontalAlignmenthorizontal alignment of text objects w.r.t. their coordinates

TitleAlignmenthorizontal alignment of titles w.r.t. their coordinates

VerticalAlignmentvertical alignment of text objects w.r.t. their coordinates

TitleAlignment controls the interpretation of the TitlePosition of the titles of graphical objects.

HorizontalAlignment and VerticalAlignment control the interpretation of the coordinates of text objects.

→ Examples

Attribute

Type

Value

See Also:

Position, Title, TitlePosition

Details:

Example 1

We plot three points with title positions 0.1 above each point. The titles are aligned such that the beginning of the text (Left), the center of the text (Center), or the end of the text (Right) is at the TitlePosition:

plot(plot::Point2d(0, 0, Title = "Point 1",
                   TitlePosition = [0, 0.1],
                   TitleAlignment = Left),
     plot::Point2d(1, 1, Title = "Point 2",
                   TitlePosition = [1, 1.1],
                   TitleAlignment = Center),
     plot::Point2d(2, 2, Title = "Point 2",
                   TitlePosition = [2, 2.1],
                   TitleAlignment = Right),
     PointSize = 2.5*unit::mm)

MuPAD graphics

Example 2

The following call generates a table showing all the combinations of HorizontalAlignment and VerticalAlignment:

Hor := [Left, Center, Right]:
Vert := [Top, BaseLine, Center, Bottom]:
plot((plot::Text2d(expr2text(Hor[i], Vert[j]), [i, j],
                   HorizontalAlignment = Hor[i],
                   VerticalAlignment   = Vert[j]),
      plot::Point2d([i, j], Color = RGB::Black))
     $ i = 1..3 $ j = 1..4, Axes = None,
     TitleFont = [13], PointSize = 2.5*unit::mm)

MuPAD graphics

delete Hor, Vert:

  


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