plots - Maple Programming Help

Home : Support : Online Help : Graphics : Packages : plots : plots/textplot

plots

 textplot
 plot containing text

 Calling Sequence textplot(L, options)

Parameters

 L - list or a set options - optional arguments (see Description)

Description

 • This command allows you to create a 2-D plot containing text.  The input L is either a single text point or a list or set of text points.  Here a single text point consists of three components with the last component being the text to be placed at the coordinates defined by the first components of the text point. For plotting text in three dimensions see plots[textplot3d].
 • The third component of the text point can be a string that gets displayed as plain text without the quotation marks or a mathematical expression that is typeset.  For more information on how to specify this component, see plot/typesetting.
 • The default alignment is centered in both right and left along with top and bottom. One can reset the desired alignment for the text via the option align = t, where t is either one of below, right, above, left or a list or set of these alignment specifications.
 The text can be rotated with the option rotation = r where r must evaluate to a real number that is assumed to be in radians or be one of the names horizontal (equivalent to 0 radians) or vertical (equivalent to Pi radians).
 The rest of the options to textplot are the same as the options to plot.  See plot/options.
 • The align, color, font and rotation options may be included within a text point list, in which case they apply only to that particular point.
 Note: When applying a command that alters the plot structure to a plot containing text, only the position of the text is transformed, not the actual characters.

Examples

 > $\mathrm{with}\left(\mathrm{plots}\right):$
 > \mathrm{textplot}\left(\left[1,2,"zebra"\right],'\mathrm{align}'=\left\{'\mathrm{above}','\mathrm{right}'\right\}\right)
 > $\mathrm{textplot}\left(\left\{\left[1,2,"zebra"\right],\left[3,2,"oryx"\right]\right\},'\mathrm{view}'=\left[0..4,1..3\right]\right)$
 > $\mathrm{textplot}\left(\left[\left[2,3,"zebra"\right],\left[2,1,"oryx"\right]\right],'\mathrm{color}'="Blue",'\mathrm{view}'=\left[1..3,0..4\right]\right)$
 > $\mathrm{textplot}\left(\left[\left[2,3,"zebra",'\mathrm{rotation}'=\frac{\mathrm{\pi }}{4},'\mathrm{font}'=\left["times","roman",20\right]\right],\left[2,1,"oryx"\right]\right],'\mathrm{view}'=\left[1..3,0..4\right]\right)$

The following commands were used to create the plot from the Plotting Guide.

 > $p≔\mathrm{plot}\left(\mathrm{sin}\left(x\right),x=-\mathrm{\pi }..\mathrm{\pi }\right):$
 > \mathrm{t1}≔\mathrm{textplot}\left(\left[\frac{\mathrm{\pi }}{2},1,'\mathrm{typeset}'\left("Local Maxima",\left[\frac{\mathrm{\pi }}{2},1\right]\right)\right],'\mathrm{align}'='\mathrm{above}'\right):
 > \mathrm{t2}≔\mathrm{textplot}\left(\left[-\frac{\mathrm{\pi }}{2},-1,'\mathrm{typeset}'\left("Local Minima",\left[-\frac{\mathrm{\pi }}{2},-1\right]\right)\right],'\mathrm{align}'='\mathrm{below}'\right):
 > $\mathrm{display}\left(\left\{p,\mathrm{t1},\mathrm{t2}\right\},'\mathrm{view}'=\left[-\mathrm{\pi }..\mathrm{\pi },-1.5..1.5\right]\right)$

Compatibility

 • The plots[textplot] command was updated in Maple 2018.
 • The rotation option was introduced in Maple 2018.