Position of object titles
MuPAD® notebooks will be removed in a future release. Use MATLAB® live scripts instead.
MATLAB live scripts support most MuPAD functionality, though there are some differences. For more information, see Convert MuPAD Notebooks to MATLAB Live Scripts.
TitlePosition sets the position where the
object title is displayed.
TitlePositionZ refer to the individual components
the anchor point of the title, which is in 3D displayed in “bill-boarding
mode,” which means that the text will always face the observer
and will always be displayed in the same size, regardless of zooming
or perspective. The alignment of the text w.r.t. the anchor point
is further determined by the setting of
cf. Example 1.
MuPAD does not have automatic positioning of titles; to
have a title properly positioned,
We plot three points with titles attached to them, changing the alignment. For demonstration purposes, the title positions coincide with the points:
plot(plot::Point2d(0, 3, Title = "Left", TitlePosition = [0, 3], TitleAlignment = Left), plot::Point2d(0, 2, Title = "Center", TitlePosition = [0, 2], TitleAlignment = Center), plot::Point2d(0, 1, Title = "Right", TitlePosition = [0, 1], TitleAlignment = Right), Axes = None, PointSize = 2.0*unit::mm, ViewingBox = [-1..1, 0..4])
A more realistic placement of titles is to separate them slightly from the points:
plot(plot::Polygon2d([[0, 0], [5, 0], [9/5, 12/5]], Closed), plot::Point2d([0, 0], Title = "A", TitlePosition = [-0.2, -0.1]), plot::Point2d([5, 0], Title = "B", TitlePosition = [5.2, -0.1]), plot::Point2d([9/5, 12/5], Title = "C", TitlePosition = [2.0, 2.5]), Axes = None, TitleFont = , LineColor = RGB::Black, LineWidth = 0.5*unit::mm, PointSize = 3*unit::mm)