next up previous 264
Next: AST_TIMEADD - Add a time coordinate conversion to a TimeMap
Up: AST Routine Descriptions
Previous: AST_TESTFITS - See if a named keyword has a defined value in a FitsChan


AST_TEXT - Draw a text string for a Plot

Description:
This function draws a string of text at a position specified in the physical coordinate system of a Plot. The physical position is transformed into graphical coordinates to determine where the text should appear within the plotting area.
Invocation:
CALL AST_TEXT( THIS, TEXT, POS, UP, JUST, STATUS )
Arguments:
THIS = INTEGER (Given)
Pointer to the Plot.
TEXT = CHARACTER $*$ ( $*$ ) (Given)
A character string containing the text to be drawn. Trailing white space is ignored.
POS( $*$ ) = DOUBLE PRECISION (Given)
An array, with one element for each axis of the Plot, giving the physical coordinates of the point where the reference position of the text string is to be placed.
UP( $*$ ) = REAL (Given)
An array holding the components of a vector in the "up" direction of the text (in graphical coordinates). For example, to get horizontal text, the vector [0.0,1.0] should be supplied. For a basic Plot, 2 values should be supplied. For a Plot3D, 3 values should be supplied, and the actual up vector used is the projection of the supplied up vector onto the text plane specified by the current value of the Plot3D's Norm attribute.
JUST = CHARACTER $*$ ( $*$ ) (Given)
A character string identifying the reference point for the text being drawn. The first character in this string identifies the reference position in the "up" direction and may be "B" (baseline), "C" (centre), "T" (top) or "M" (bottom). The second character identifies the side-to-side reference position and may be "L" (left), "C" (centre) or "R" (right ). The string is case-insensitive, and only the first two characters are significant.

For example, a value of "BL" means that the left end of the baseline of the original (un-rotated) text is to be drawn at the position given by POS.

STATUS = INTEGER (Given and Returned)
The global status.
Notes:
  • The Plot3D class currently does not interpret graphical escape sequences contained within text displayed using this method.

  • Text is not drawn at positions which have any coordinate equal to the value AST__BAD (or where the transformation into graphical coordinates yields coordinates containing the value AST__BAD).

  • If the plotting position is clipped (see AST_CLIP), then no text is drawn.

  • An error results if the base Frame of the Plot is not 2-dimensional or (for a Plot3D) 3-dimensional.

  • An error also results if the transformation between the current and base Frames of the Plot is not defined (i.e. the Plot's TranInverse attribute is zero).


next up previous 264
Next: AST_TIMEADD - Add a time coordinate conversion to a TimeMap
Up: AST Routine Descriptions
Previous: AST_TESTFITS - See if a named keyword has a defined value in a FitsChan

AST A Library for Handling World Coordinate Systems in Astronomy
Starlink User Note 210
R.F. Warren-Smith & D.S. Berry
24th May 2011
E-mail:ussc@star.rl.ac.uk

Copyright (C) 2009 Science \& Technology Facilities Council