- See Also
-
Related Guides
- Textual Elements in Notebooks
- Mathematical Typesetting
- Maps & Cartography
- Options & Styling for Interactive Manipulation
- Notebook Document Generation
- Chart Labeling, Legending & Annotation
- Labels
- Graphics Annotation & Appearance
- Creating Form Interfaces & Apps
- Standalone Interfaces
- Symbolic Graphics Language
- Tech Notes
-
- See Also
-
Related Guides
- Textual Elements in Notebooks
- Mathematical Typesetting
- Maps & Cartography
- Options & Styling for Interactive Manipulation
- Notebook Document Generation
- Chart Labeling, Legending & Annotation
- Labels
- Graphics Annotation & Appearance
- Creating Form Interfaces & Apps
- Standalone Interfaces
- Symbolic Graphics Language
- Tech Notes
Text
Details and Options
- The text is displayed by default in StandardForm, but in a typical textual font such as Arial or Helvetica.
- Text can be used in both two- and three-dimensional graphics.
- In graphics, Text[expr] is equivalent to Text[expr,{0,0}] or Text[expr,{0,0,0}].
- Text[expr,coords] works like Inset[expr,coords].
- 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 -1 to +1.
- Sample offsets to use in two-dimensional graphics include:
-
{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 and 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 following options can be given:
-
Background None background color ContentSelectable Automatic whether to allow selection of contents BaseStyle {} base style specifications for the contents FormatType Automatic format type - Outside of graphics, Text[expr] effectively generates a TextCell.
Examples
open all close allBasic Examples (3)
Scope (10)
Positions (6)
By default, Center is used for the position of the text in 2D:
{Graphics[{Text["ABCDEF"], Circle[]}, Axes -> True, Ticks -> None],
Graphics[{Text["ABCDEF", Center], Circle[]}, Axes -> True, Ticks -> None]}Automatic is equivalent to Center:
Graphics[{Text["ABCDEF", Automatic], Circle[]}, Axes -> True, Ticks -> None]Specify ordinary coordinates in a graphic:
Graphics[{Text[2Pi r, {.5, .5}], Circle[]}, Frame -> True]Graphics3D[{Text[4Pi r ^ 2, {0, .5, .5}], Sphere[]}, Axes -> True]Use Scaled coordinates:
Graphics[{Text[Pi r ^ 2, Scaled[{.5, .5}]], Circle[]}]Graphics3D[{Text[a ^ 3, Scaled[{.5, .5, 1}]], Cuboid[]}]ImageScaled specifies coordinates in a whole image, including padding:
Framed@Graphics[{Text[x ^ 2 + y ^ 2 == 1, ImageScaled[{.5, .5}]], Circle[]}, ImagePadding -> {{0, 50}, {0, 0}}]Use Offset coordinates in 2D:
Graphics[{Text[Pi r ^ 2, Offset[{10, 20}, {0, 0}]], Circle[]}]Symbolic positions can be specified:
Table[Graphics[{Text["ABCDEF", {s, Center}], Circle[]}], {s, {Left, Center, Right}}]Table[Graphics[{Text["ABCDEF", {Center, s}], Circle[]}], {s, {Top, Center, Bottom}}]Offsets and Directions (4)
By default, Center is used for the alignment position:
{Graphics[{Text["ABCDEF", {0, .5}], Circle[]}, Axes -> True, Ticks -> None],
Graphics[{Text["ABCDEF", {0, .5}, Center], Circle[]}, Axes -> True, Ticks -> None]}Automatic is equivalent to Center:
Graphics[{Text["ABCDEF", {0, .5}, Automatic], Circle[]}, Axes -> True, Ticks -> None]Specify an alignment position within the text, using symbolic positions:
Table[Graphics[{Text["ABCDEF", {0, 0}, {p, Center}], Circle[]}, Axes -> {False, True}, Ticks -> None], {p, {Right, Center, Left}}]Table[Graphics[{Text["ABCDEF", {0, 0}, {Center, p}], Circle[]}, Axes -> {True, False}, Ticks -> None], {p, {Top, Center, Bottom}}]Specify the offsets using
,
coordinates within the text:
Table[Graphics[{Text["ABCDEF", {0, 0}, a], Circle[]}, Axes -> True, Ticks -> None], {a, {{1, 1}, {-1, 1}, {-1, -1}, {1, -1}}}]Table[Graphics3D[{Text["ABCDEF", {0, 0, 0}, a], Sphere[]}], {a, {{1, 1}, {-1, 1}, {-1, -1}, {1, -1}}}]Specify the orientation of text using a vector:
Table[Graphics[{Text[Style[x ^ 2 + y ^ 2 < 1, Medium], {0, 0}, Automatic, d], Circle[]}], {d, {{1, 0}, {1, 1}, {0, 1}, {-1, -1}}}]Options (3)
Background (1)
FormatType (2)
By default, expressions are displayed using TraditionalForm:
Graphics[{Text[Style[x ^ 2 + y ^ 2 < 1, Medium]], Circle[]}]Display expressions using StandardForm:
Graphics[{Text[Style[x ^ 2 + y ^ 2 < 1, Medium], FormatType -> StandardForm], Circle[]}]Properties & Relations (2)
The symbolic positions are relative to ImageScaled coordinates:
Table[Framed@Graphics[{Text["ABCDEF", {s, Center}], Circle[]}, ImagePadding -> {{10, 40}, {0, 0}}], {s, {Left, Center, Right}}]Table[Framed@Graphics[{Text["ABCDEF", {Center, s}], Circle[]}, ImagePadding -> {{0, 0}, {10, 20}}], {s, {Top, Center, Bottom}}]Text styles can be specified by using Style:
Graphics[{Text[Style["ABCDEF", Large, Bold, Red], {0, 0}, Automatic, {2, 1}], Circle[]}]Tech Notes
Related Guides
-
▪
- Textual Elements in Notebooks ▪
- Mathematical Typesetting ▪
- Maps & Cartography ▪
- Options & Styling for Interactive Manipulation ▪
- Notebook Document Generation ▪
- Chart Labeling, Legending & Annotation ▪
- Labels ▪
- Graphics Annotation & Appearance ▪
- Creating Form Interfaces & Apps ▪
- Standalone Interfaces ▪
- Symbolic Graphics Language
History
Introduced in 1988 (1.0) | Updated in 1996 (3.0) ▪ 2007 (6.0) ▪ 2008 (7.0) ▪ 2016 (11.0)
Text
Wolfram Research (1988), Text, Wolfram Language function, https://reference.wolfram.com/language/ref/Text.html (updated 2016).
CMS
Wolfram Language. 1988. "Text." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2016. https://reference.wolfram.com/language/ref/Text.html.
APA
Wolfram Language. (1988). Text. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/Text.html
BibTeX
@misc{reference.wolfram_2026_text, author="Wolfram Research", title="{Text}", year="2016", howpublished="\url{https://reference.wolfram.com/language/ref/Text.html}", note=[Accessed: 13-June-2026]}
BibLaTeX
@online{reference.wolfram_2026_text, organization={Wolfram Research}, title={Text}, year={2016}, url={https://reference.wolfram.com/language/ref/Text.html}, note=[Accessed: 13-June-2026]}