| Contents | Index |
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.
|
Attribute |
Type |
Value |
See Also:
Position, Title, TitlePosition
Details:
Titles of graphical objects are placed at the position defined by TitlePosition. TitleAlignment determines whether the beginning, the center, or the end of the title text is aligned at this position. Cf. example 1.
Text objects (i.e., objects of type plot::Text2d or plot::Text3d) carry, in their Position attribute, a position. HorizontalAlignment and VerticalAlignment together determine which point of the text this position refers to. For example, with HorizontalAlignment = Left and HorizontalAlignment = Bottom, the given position is the lower left corner of the rendered text.
Example 1
We plot three points with title positions
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)

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)

delete Hor, Vert:

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 |