Adds text to a graph (S.A. Harding).
Option
WINDOW = scalar |
Window number of the graph; default 1 |
|---|
Parameters
Y = variates or scalars |
Vertical coordinates |
|---|---|
X = variates or scalars |
Horizontal coordinates |
TEXT = texts |
Text to plot |
PEN = scalars, variates or factors |
Pens to use; default 1 |
Description
The DTEXT procedure provides a convenient way of adding textual annotation or description to a plot. The text to plot is specified by the TEXT parameter. This can be either a single string, or a Genstat text structure containing several lines of text. The Y and X parameters specify where to plot the text, with scalars for a single string or line, or with variates for several lines. The PEN parameter specifies the pen or pens to use (default 1), and the WINDOW option specifies the window where the plot is taking place (default 1).
Option: WINDOW.
Parameters: Y, X, TEXT, PEN.
Action with RESTRICT
DTEXT takes account of restrictions on any set of Y, X and TEXT parameters.
See also
Procedures: DFRTEXT, DARROW, DERRORBAR, DREFERENCELINE.
Commands for: Graphics.
Example
CAPTION 'DTEXT example'; STYLE=meta
VARIATE [VALUES=0...100] theta
CALCULATE theta = 2 * C('pi') * theta / 100
& X = COS(theta)
& Y1 = SIN(theta)
& Y2 = Y1 + 1
PEN 2; METHOD=closed; SYMBOL=0; JOIN=given
DGRAPH [TITLE='Venn diagram'; WINDOW=3; KEY=0] Y1,Y2; X; PEN=2
DTEXT [WINDOW=3] Y=1.5,0.5,-0.5; X=0; TEXT='A','A and B','B'