Object Reference : Object View and Procedure Reference : Geomap
  
 
addtext
Place text in geomaps.
When adding text in one of the four predefined positions (left, right, top, bottom), EViews deletes any existing text that is in that position before adding the new text. Use the keep option to preserve the existing text.
Syntax
geomap_name.addtext(options) "text"
Follow the addtext keyword with the text to be placed in the geomap, enclosed in double quotes.
To include carriage returns in your text, use the control “\r” or “\n” to represent the return. Since the backslash “\” is a special character in the addtext command, use a double slash “\\” to include the literal backslash character.
Options
The following options may be provided to change the characteristics of the specified text object. Any unspecified options will use the default text settings of the geomap.
 
font([face], [pt], [+/- b], [+/- i], [+/- u], [+/- s])
Set characteristics of text font. The font name (face), size (pt), and characteristics are all optional. face should be a valid font name, enclosed in double quotes. pt should be the font size in points. The remaining options specify whether to turn on/off boldface (b), italic (i), underline (u), and strikeout (s) styles.
textcolor(arg)
Sets the color of the text. arg may be one of the predefined color keywords, or it may be specified using individual red-green-blue (RGB) components using the “@RGB” or “@HEX” functions. The arguments to the @RGB function are a set of three integers from 0 to 255, representing the RGB values of the color. The arguments to the “@HEX” function are a set of six characters representing the RGB values of the color in hexadecimal. Each two character set represents a red, green or blue component in the range '00' to 'FF'. For a description of the available color keywords see “Color definitions”.
fillcolor(arg)
Sets the background fill color of the text box. arg may be one of the predefined color keywords, or it may be specified using individual red-green-blue (RGB) components using the “@RGB” or “@HEX” functions. The arguments to the @RGB function are a set of three integers from 0 to 255, representing the RGB values of the color. The arguments to the “@HEX” function are a set of six characters representing the RGB values of the color in hexadecimal. Each two character set represents a red, green or blue component in the range '00' to 'FF'. For a description of the available color keywords see “Color definitions”.
framecolor(arg)
Sets the color of the text box frame. arg may be one of the predefined color keywords, or it may be specified using individual red-green-blue (RGB) components using the “@RGB” or “@HEX” functions. The arguments to the @RGB function are a set of three integers from 0 to 255, representing the RGB values of the color. The arguments to the “@HEX” function are a set of six characters representing the RGB values of the color in hexadecimal. Each two character set represents a red, green or blue component in the range '00' to 'FF'. For a description of the available color keywords see “Color definitions”.
keep
When adding text to one of the predefined positions (left, right, top, bottom), any existing text in that position will be deleted and replaced with the new text. Use the “keep” option to preserve the existing text and place the second text object on top of the text in that position.
The following options control the position of the text:
 
t, ac
Top (above and centered over the geomap).
l
Left rotated.
r
Right rotated.
b, bc
Below and centered over the geomap.
bl
Below and left side of the geomap.
br
Below and right side of the geomap.
al
Above and left side of the geomap.
ar
Above and right side of the geomap.
ibl
Inside near the bottom left corner of the geomap.
ibr
Inside near the bottom right corner of the geomap.
itl
Inside near the top left corner of the geomap.
itr
Inside near the top right corner of the geomap.
just(arg)
Set the justification of the text, where arg may be: “c” (center), “l” (left - default), “r” (right).
x, lb
Enclose text in a large box.
sb
Enclose text in a small box.
The options which support the “–” may be preceded by a “+” or “–” indicating whether to turn on or off the option. The “+” is optional.
To place text within a geomap, you can use explicit coordinates to specify the position of the upper left corner of the text.
Coordinates are set by a pair of numbers h, v in virtual inches. Individual geomaps are always virtual inches (scatter diagrams are virtual inches) or a user-specified size, regardless of their current display size.
The origin of the coordinate is the upper left hand corner of the geomap. The first number h specifies how many virtual inches to offset to the right from the origin. The second number v specifies how many virtual inches to offset below the origin. The upper left hand corner of the text will be placed at the specified coordinate.
Coordinates may be used with other options, but they must be in the first two positions of the options list. Coordinates are overridden by other options that specify location.
When addtext is used with a multiple geomap, the text is applied to the whole geomap, not to each individual geomap.
Color definitions
color_arg specifies the color to be employed in the arguments above. The color may be specified using predefined color names, by specifying the individual red-green-blue (RGB) components using the special “@RGB” function, or by specifying the individual red-green-blue (RGB) components in hexadecimal using the special “@HEX” function.
The predefined colors are given by the keywords (with their RGB and HEX equivalents):
 
blue
@rgb(0, 0, 255)
@hex(0000ff)
red
@rgb(255, 0, 0)
@hex(ff0000)
ltred
@rgb(255, 168, 168)
@hex(ffa8a8)
green
@rgb(0, 128, 0)
@hex(008000)
black
@rgb(0, 0, 0)
@hex(000000)
white
@rgb(255, 255, 255)
@hex(ffffff)
purple
@rgb(128, 0, 128)
@hex(800080)
orange
@rgb(255, 128, 0)
@hex(ff8000)
yellow
@rgb(255, 255, 0)
@hex(ffff00)
gray
@rgb(128, 128, 128)
@hex(808080)
ltgray
@rgb(192, 192, 192)
@hex(c0c0c0)
Examples
geomap1.addtext(ctm) "Fig 1: California Population"
places the text “Fig1: California Population” centered above of geomap1.
geomap1.addtext(400, 350, rap, X) "Population surge"
places the text “Population surge” in a box within geomap1, where the text is center above the point located at (400, 350).
geomap1.addtext(c, ltm, textcolor(@rgb(green)), fillcolor(grey), framecolor(black)) "Great Lake\nWater Levels"
adds the text “Great Lakes” with “Water Levels” just below on a second line at the top left corner of the map. The text is colored green and is enclosed in a grey box with a large black frame.
Cross-references
See “Geomaps” for a discussion of geomaps. See “Value-Based Text and Fill Coloring” for discussion of color settings.
See also Geomap::setfillcolor.