Text
Usage
• Text[expr, coords] is a graphics primitive that represents text corresponding to the printed form of expr, centered at the point specified by coords.
Notes
• Text can be used in both two- and three-dimensional graphics. • The coordinates can be specified either as {x, y, ... } or as Scaled[{x, y, ... }]. • In two dimensions, coordinates can also be specified using Offset. • Text[expr, coords, offset] specifies an offset for the block of text relative to the coordinates given. Giving an offset {sdx, sdy} specifies that the point {x, y} should lie at relative coordinates {sdx, sdy} within the bounding rectangle that encloses the text. Each relative coordinate runs from -1 to +1 across the bounding rectangle. • The offsets specified need not be in the range  to  . • Here are sample offsets to use in two-dimensional graphics:
| {0, 0} | text centered at {x, y} | | {-1, 0} | left-hand end at {x, y} | | {1, 0} | right-hand end at {x, y} | | {0, -1} | centered above {x, y} | | {0, 1} | centered below {x, y} |
• Text[expr, coords, offset, dir] specifies the orientation of the text is given by the direction vector dir. Possible values of dir are:
| {1, 0} | ordinary horizontal text | | {0, 1} | vertical text reading from bottom to top | | {0, -1} | vertical text reading from top to bottom | | {-1, 0} | horizontal upside-down text |
• Text in three-dimensional graphics is placed at a position that corresponds to the projection of the point {x, y, z} specified. Text is drawn in front of all other objects. • The font or style for text can be specified using StyleForm or using the TextStyle option. If no such specifications are given, the font is determined from the setting for TextStyle for the whole plot, which is in turn by default given by the global variable $TextStyle. • The option CharacterEncoding for Display can be used to specify what raw character encoding to use for character strings in Text objects. • The following options can be given: • New in Version 1; modified in 3.
|