Object Reference : Object View and Procedure Reference : Geomap
  
Geomap
 
Scalar Values
String values
addtext
Color definitions
addtitle
Color definitions
attr
autocrop
clearhist
clearremarks
copy
display
displayname
formatshapelabel
geomap
hide
label
legend
link
load
makeattrser
map
mask
movetitle
olepush
options
save
Postscript Options
LaTeX Options
setattr
setfillcolor
Single color
Positive-negative single threshold
Single range
High-Low-Median
Custom
Custom Base Color
Custom Threshold
Custom Range
options
setfont
setjust
setshapelabel
show
unmask
Geomap object. Specialized object to display shapefile map data.
Geomap Declaration
geomap declare Geomap object.
Geomap Views
attr table of shapefile area attributes.
label label view.
display display default geomap view.
map displays the map view of a geomap object.
Geomap Procs
addtext place text in geomap.
addtitle place an individual title in geomap.
autocrop calculates and resets the minimum viewable size of a geomap.
clearhist clear the contents of the history attribute.
clearremarks clear the contents of the remarks attribute.
copy creates a copy of the geomap.
displayname set display name.
formatshapelabel adjusts the appearance and location of one or more shape labels.
hide hides the specified area(s) in the geomap.
legend set legend specific options.
link link an attribute in the geomap to a series in the workfile.
load load a shapefile from disk.
makeattrser make alpha series containing linked attribute values.
mask make invisible specified areas in the geomap.
movetitle moves the title in the geomap to the specified location.
olepush push updates to OLE linked objects in open applications.
options change display options settings for the geomap.
save save default view to a graphics file.
setattr set the vaue of an object attribute.
setfillcolor define the fill (background) color used in geomap shapes using values in a series.
setfont set the font for the geomap text.
setjust set the horizontal justification for multi-line area labels.
setshapelabel set which attribute to use or create a custom label to use when labeling shapes.
show shows the specified area(s) in the geomap.
unmask make visible specified areas in the geomap.
Geomap Data Members
Scalar Values
@minx minimum horizontal position of the geomap.
@maxx maximum horizontal position of the geomap.
@miny minimum vertical position of the geomap.
@maxy maximum vertical position of the geomap.
@count number of areas in the geomap.
@id("attr","val") the id number of the area which has the matching attribute value for the specified attribute name.
String values
@attr("arg") string containing the value of the arg attribute, where the argument is specified as a quoted string.
@description string containing the geomap object’s description (if available).
@detailedtype string with the object type: “GEOMAP”.
@displayname string containing the geomap object’s display name. If the geomap has no display name set, the name is returned.
@ids("attr", "val") space delimited string containing the ID numbers of all the areas which has the matching attribute value for the specified attribute name.
@name string containing the geomap object’s name.
@remarks string containing the geomap object’s remarks (if available).
@type string with the object type: “GEOMAP”.
@updatetime string representation of the time and date at which the geomap was last updated.
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.
addtitle
Place an individual title in geomaps.
A geomap is capable of storing one title. When adding a title to a geomap that already has a title, the existing title will be deleted.
Syntax
geomap_name.addtitle(options) "text"
Follow the addtitle 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 addtitle 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”.
The following options control the position of the text:
ctm
Center top map.
ltm
Left top map.
rtm
Right top map.
cbm
Center bottom map.
lbm
Left bottom map.
rbm
Right bottom map.
lmm
Left middle map.
rmm
Right middle map.
lmp
Left-middle of point.
rmp
Right-middle of point.
lap
Left above point.
rap
Right above point.
lbp
Left below point.
rbp
Right below point.
cap
Center above point.
cbp
Center below point.
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.
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 map units. Use the geomap data members @minx, @miny, @maxx, and @maxy to obtain the position limits.
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.
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.addtitle(ctm) "Fig 1: United States Population"
places the text "Fig 1: United States Population" centered above of GEOMAP1.
geomap1.addtitle(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.addtitle(c, ltm, textcolor(green), fillcolor(gray), 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 gray box with a large black frame.
Cross-references
See “Geomaps” for a discussion of geomaps. See “Value-Based Text and Fill Coloring” for a discussion of color settings.
See also Geomap::setfillcolor.
attr
Display table view of the shapefile attributes for each of the areas defined in the geomap.
Syntax
geomap_name.attr
Options
p
Print view.
Examples
gmap1.attr(p)
displays and prints the default attr view.
Cross-references
See “Geomaps” for a discussion of geomaps.
autocrop
Calculates and resets the minimum viewable size of a geomap.
When adding, moving, or removing objects such as text or shapes from a geomap, the minimum viewable size of a geomap may change. This may cause distortions in the whitespace surrounding the map with respect to the on-screen scrollbar or external output like file saving. Autocrop will readjust the size of the geomap to make the whitespace proportional.
Syntax
geomap_name.autocrop
Examples
geomap1.autocrop
resizes and recrops geomap1.
clearhist
Clear the contents of the history attribute.
Removes the geomap’s history attribute, as shown in the label view of the scalar.
Syntax
geomap_name.clearhist
Examples
g1.clearhist
g1.label
The first line removes the history from the geomap G1, and the second line displays the label view of G1, including the now blank history field.
Cross-references
See “Labeling Objects” for a discussion of labels and display names.
See also Geomap::label.
clearremarks
Clear the contents of the remarks attribute.
Removes the scalar’s remarks attribute, as shown in the label view of the scalar.
Syntax
scalar_name.clearremarks
Examples
s1.clearremarks
s1.label
The first line removes the remarks from the scalar S1, and the second line displays the label view of S1, including the now blank remarks field.
Cross-references
See “Labeling Objects” for a discussion of labels and display names.
See also Geomap::label.
copy
Creates a copy of the geomap.
Creates either a named or unnamed copy of the geomap.
Syntax
geomap_name.copy
geomap_name.copy dest_name
Examples
g1.copy
creates an unnamed copy of the geomap G1.
g1.copy g2
creates G2, a copy of the geomap G1.
Cross-references
See also copy.
display
Display the default map view of the geomap.
Syntax
geomap_name.display
Examples
gmap1.display(p)
displays and prints the default map view.
Options
a
All observations (ignore sample)
p
Print.
Cross-references
See “Geomaps” for a discussion of geomaps.
displayname
Display name for a geomap object.
Attaches a display name to a geomap object. The display name may be used to label output in tables and graphs in place of the standard geomap object name.
Syntax
geomap_name.displayname display_name
Display names are case-sensitive, and may contain various characters, such as spaces, that are not allowed in geomap object names.
Examples
g1.displayname My Geomap
g1.label
The first line attaches a display name “My Geomap” to the geomap object G1, and the second line displays the label view of G1, including its display name.
Cross-references
See “Labeling Objects” for a discussion of labels and display names. See also Geomap::label.
formatshapelabel
Adjusts the appearance and location of one or more shape labels.
Syntax
geomap_name.formatshapelabel(options) [shapes]
where options is the set of the label characteristics to be changed, shapes is the list of shapes whose labels are to be modified.
geomap_name.formatshapelabel (shape_attribute, label_attributes) attr_value
where shape_attribute is the name of the shape attribute used to match attr_value.
Options
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.
Examples
geomap1.formatshapelabel(x) 2 5 10
will enclose the label in a large box for the second, fifth, and tenth shape in the GEOMAP1 geomap object.
geomap1.formatshapelabel(attr=statename, textcolor(red), pos(100,100)) nevada “south dakota”
will set the text color to red and move the label to (100, 100) for the shapes in GEOMAP1 whose state attribute matches nevada and south dakota.
geomap
Declare a geomap object.
Syntax
geomap geomap_name
Declare a geomap object that is capable of reading Esri ( www.esri.com) shapefiles. Geomaps are useful for visualizing data that are tied to specific geographic regions.
Examples
geomap gmap
Cross-references
See “Geomaps” for a discussion of geomaps.
hide
Hides the specified area(s) in the geomap.
Syntax
geomap_name.hide area_list
where area_list is a list of areas that will be made hidden in addition to what is already hidden. area_list may be a list of area IDs or “all.” The area ID for each area is listed in the attributes view of the geomap and corresponds to the EViews ID column.
Examples
geomap01.hide 1 4 6
hides areas numbered 1, 4, and 6 in the geomap object GEOMAP1.
geomap01.hide all
hides all the areas in the geomap object GEOMAP1.
Cross-references
See also Geomap::show.
label
Display or change the label view of the geomap object, including the last modified date and display name (if any).
Syntax
geomap_name.label
geomap_name.label(options) text
Options
To modify the label, you should specify one of the following options along with optional text. If there is no text provided, the specified field will be cleared:
c
Clears all text fields in the label.
d
Sets the description field to text.
s
Sets the source field to text.
u
Sets the units field to text.
r
Appends text to the remarks field as an additional line.
p
Print the label view.
Examples
The following lines replace the remarks field of the geomap GMAP with “Annual rainfall for region”:
gmap.label(r)
gmap.label(r) Annual rainfall in region
Cross-references
See “Labeling Objects” for a discussion of labels.
legend
Set legend specific options in geomaps.
Syntax
geomap_name.legend(options) legend_arg
where legend_arg may include:
[+/-]display
Make the legend visible or invisible
Options
vertical
Set legend orientation to be vertical
Examples
gmap1.legend display
displays the legend horizontally.
gmap1.legend(vertical) +display
displays the legend vertically.
gmap1.legend -display
hides the legend.
Cross-references
See “Geomaps” for a discussion of geomaps.
link
Link an attribute in the geomap object to a series in the workfile.
Syntax
geomap_name.link attribute_name series_name
associates individual shapes in the geomap with observations in the workfile by matching attribute values for shapes (defined in the loaded shapefile), with the values of the series.
If there are multiple matching series observations for a given attribute value, the first matching series observation value will be used.
Examples
gmap1.link fips statesfips
links the values of the FIPS attribute of each area to the first matching observation in the STATEFIPS series.
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.
load
Load a shapefile from disk.
Syntax
geomap_name.load file_description
where file_description is a local file found on disk.
Examples
gmap1.load c:\temp\california.prj
loads the “c:\temp\california.prj” shapefile. Note the corresponding “.dbf”, “.shp”, and “.shx” files must also be present in the same directory (for this example, “California.dbf”, “California.shp”, and “California.shx”).
Cross-references
See “Geomaps” for a discussion of geomaps.
makeattrser
Create series containing linked attribute values from the shapefile.
Saves the values of the specified attributes linked to each observation in the workfile in series.
Syntax
geomap_name.makeattrser attr_name [series_name]
geomap_name.makeattrser(options) attr_name1 series_name1 [attr_name2 series_name2 ... ]
geomap_name.makeattrser(options) @all [name_pattern]
You must first provide attr_name, the name of an attribute that exists in the shapefile. You may optionally provide a name for the series in the workfile to hold the linked values for the attribute. By default, EViews will use the attribute name for the series, or will construct a valid EViews name from the series.
If you wish to save linked values for more than one attribute in the shapefile, you should enter the names in pairs. You may optionally provide a name for a group to contain the series.
You may instruct EViews to save all of the attributes by using the keyword “@all”. EViews will attempt to use the attribute name for the series, unless you provide a wildcard pattern, in which case, EViews will construct the name from the pattern and the attribute names.
Options
n=arg
(optional) Name of group to contain the saved attribute series.
Examples
gmap1.makeattrser(n=grp1) @all
will create attribute series corresponding to all of the attribute types in the shapefile, using the names of the attributes for the series names.
gmap1.makeattrser rainfall rfall
will create an attribute series RFALL containing the linked values of the “rainfall” attribute.
gmap1.makeattrser ranfall rfall population pop acreage size
will create the series RFALL, POP, and SIZE in the workfile, and will fill these series with the “rainfall”, “population”, and “acreage” attributes from the shapefile.
Cross-references
See “Geomaps” for a discussion of geomaps.
map
Displays the map view of a geomap object.
Syntax
geomap_name.map(options)
Options
p
Print the map view.
Examples
geomap1.map(p)
displays and prints map view of the geomap GEOMAP1.
mask
Make specified areas in the geomap invisible.
Syntax
geomap_name.mask area_list
where area_list is a space delimited integer list of the area IDs. To obtain the ID number of an area, see the @id geomap data member.
The keyword “@unlinked” may be used to specify all shapes that are not linked to observations in the workfile.
Examples
gmap1.mask 2 4 10 20
turns off display for areas 2, 4, 10, and 20 in the geomap object GMAP1.
gmap1.mask @unlinked
turns off display for all unlinked shapes from the shapefile.
Cross-references
See “Geomaps” for a discussion of geomaps.
See also Geomap::unmask.
movetitle
Moves the title in the geomap to the specified location.
Syntax
geomap_name.movetitle(position)
where position can be one of the following:
ctm
Center top map.
ltm
Left top map.
rtm
Right top map.
cbm
Center bottom map.
lbm
Left bottom map.
rbm
Right bottom map.
lmm
Left middle map.
rmm
Right middle map.
lmp
Left-middle of point.
rmp
Right-middle of point.
lap
Left above point.
rap
Right above point.
lbp
Left below point.
rbp
Right below point.
cap
Center above point.
cbp
Center below point.
You can also 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 map units. Use the geomap data members @minx, @miny, @maxx, and @maxy to obtain the position limits.
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.
Examples
geomap01.movetitle(lbm)
moves the current title of the geomap object GEOMAP1 to the left bottom corner.
geomap01.movetitle(400, 400, rmp)
moves the title of the geomap object GEOMAP1 to the right of the point (400, 400) in the map.
Cross-references
See “Geomaps” for a discussion of geomaps.
olepush
Push updates to OLE linked objects in open applications.
Syntax
geomap_name.olepush
Cross-references
See “Object Linking and Embedding (OLE)” for a discussion of using OLE with EViews.
options
Set display options for a geomap object including legend and outline color.
Syntax
geomap_name.options options_list
Options
legend / -legend
Turn on and off legend.
lineclr(color_arg)
Specifies the boundary line color of the areas using the color_arg color specification.
color_arg specifies the color to be employed. 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 equivalents):
blue
@rgb(0, 0, 255)
red
@rgb(255, 0, 0)
ltred
@rgb(255, 168, 168)
green
@rgb(0, 128, 0)
black
@rgb(0, 0, 0)
white
@rgb(255, 255, 255)
purple
@rgb(128, 0, 128)
orange
@rgb(255, 128, 0)
yellow
@rgb(255, 255, 0)
gray
@rgb(128, 128, 128)
ltgray
@rgb(192, 192, 192)
Examples
gmap1.options -legend
hides the legend in the GEOMAP1 object.
gmap1.options legend lineclr(black)
displays the legend and sets the area boundary line color to black.
Cross-references
See “Geomaps” for a discussion of geomaps.
See Geomap::setfillcolor for setting the shape fill color.
save
Save the default view of a geomap object to disk as a Windows metafile (.EMF or .WMF), PostScript (.EPS), bitmap (.BMP), Graphics Interchange Format (.GIF), Joint Photographic Experts Exchange (.JPEG), Portable Network Graphics (.PNG), Portable Document Format (.PDF), LaTeX (.TEX), or Markdown (.MD).
Syntax
geomap_name.save(options) [path\]file_name
Follow the keyword with a name for the file. file_name may include the file type extension, or the file type may be specified using the “t=” option. A geomap may be saved with an EMF, WMF, EPS, BMP, GIF, JPG, PNG, PDF, or MD extension. The MD (Markdown) setting uses very basic syntax and should be usable in most editors.
If an explicit path is not specified, the file will be stored in the default directory, as set in the File Locations global options.
Options
t=file_type
Specifies the file type, where file_type may be one of: Enhanced Windows metafile (“emf” or “meta”), ordinary Windows metafile (“wmf”), Encapsulated PostScript (“eps” or “ps”), Bitmap file (“bmp”), Graphics Interchange Format (“gif”), Joint Photographic Experts Exchange (“jpeg” or “jpg”), Portable Network Graphics (“png”), Portable Document Format (“pdf”), LaTeX (“tex”), or Markdown (“md”).
Files will be saved with the “.emf”, “.wmf”, “.eps”, “.bmp”, “.gif”, “.jpeg”, “.png”, “.pdf”, “.tex”, or “.md” extensions, respectively.
u=units
Specify units of measurement, where units is one of: “in” (inches), “cm” (centimeters), “pt” (points), “pica” (picas), “pixels” (pixels). Note: pixels are only applicable to bmp, gif, jpeg, and png files. Default is inches otherwise.
w=width
Set width of the graphic in the selected units.
h=height
Set height of the graphic in the selected units.
c / -c
[Save / Do not save] the geomap in color.
trans / -trans
[Set / Do not set] background to transparent (for graph formats which support transparency).
d = dpi
Specify the number of dots per inch. Only applicable to bmp, gif, jpeg, and png files when units has not been set to pixels. In the case units = “pixels”, it is ignored.
Note that if only a width or a height option is specified, EViews will calculate the other dimension holding the aspect ratio of the geomap constant. If both width and height are provided, the aspect ratio will no longer be locked. (Note that the aspect ratio for an ordinary Windows Metafile (.WMF) cannot be unlocked, so only a height or width should be specified in this case.) EViews will default to the current geomap dimensions if size is unspecified.
All defaults with exception to dots per inch are taken from the global graph export settings (Options/Graphics Defaults.../Exporting). The default dots per inch for bmp, gif, jpeg, and png file types is equal to the number of pixels per logical inch along the screen width of your system. Values may therefore differ from system to system.
Postscript Options
box / -box
[Save / Do not save] the geomap with a bounding box. The bounding box is an invisible rectangle placed around the graphic to indicate its boundaries. The default is taken from the global graph export settings.
land
Save the geomap in landscape orientation. The default uses portrait mode.
prompt
Force the dialog to appear from within a program.
LaTeX Options
texspec / -texspec
[Include / Do not include] the full LaTeX documentation specification in the LaTeX output. The default behavior is taken from the global default settings.
Examples
gmap1.save(t=ps, -box, land) c:\data\MyGra1
saves GMAP1 as a PostScript file “MyGra1.EPS”. The geomap is saved in landscape orientation without a bounding box.
gmap2.save(t=emf, u=pts, w=300, h=300) MyGra2
saves GMAP2 in the default directory as an Enhanced Windows metafile “MyGra2.EMF”. The image will be scaled to points.
gmap3.save(t=png, u=in, w=5, d=300) MyGra3
saves GMAP3 in the default directory as a PNG file “MyGra3.PNG”. The image will be 5 inches wide at 300 dpi.
Cross-references
See “Geomaps” for a discussion of geomaps.
setattr
Set the object attribute.
Syntax
geomap_name.setattr(attr) attr_value
Sets the attribute attr to attr_value. Note that quoting the arguments may be required. Once added to an object, the attribute may be extracted using the @attr data member.
Examples
a.setattr(revised) never
String s = a.@attr("revised")
sets the “revised” attribute in the object A to the string “never”, and extracts the attribute into the string object S.
Cross-references
See “Adding Custom Attributes in the Label View” and “Adding Your Own Label Attributes”.
setfillcolor
Define the fill (background) color used in geomap shapes using values in a series.
Syntax
geomap_name.setfillcolor(t=type) fillcolor_args
where:
type = arg
Type of fill coloring for spreadsheet cells: “single” (single color), “posneg” (positive-negative single threshold), “range” (single range coloring), “hilo” (high-low-median), “custom” (custom coloring).
General Arguments
To specify the series or expression whose values will determine the background color:
mapser(spec)
where spec is a series name or expression.
To specify the minimum and maximum values where the coloring begins and ends:
min(color_arg)
max(color_arg)
To set the missing value (NA) background color:
naclr(color_arg)
where color_arg is described below in “Color definitions”. If omitted, the color defaults to “white”.
Type-specific Arguments
There are optional type-specific arguments that correspond to each of the type choices:
Single color
To set the single background color:
clr(color_arg)
where color_arg is described below in “Color definitions”. If omitted, the color defaults to “white”.
Positive-negative single threshold
You may set the color for both the non-negative (posclr) and the negative (negclr) values
posclr(color_arg)
negclr(color_arg)
where color_arg is described below in “Color definitions”. If omitted, the non-negative color defaults to “white” and the negative color defaults to light-red.
Single range
To specify the range, you must specify the range endpoints:
range(lower_val, upper_val[, range_def)
where range_def specifies the range endpoints:
cright
closed on the right only
cboth
closed on both sides
cleft
closed on the left only
oboth
open on both sides
By default, the range will be open on the lower and closed on the upper threshold limits.
You should provide a color specification for the inside range color (inclr) and outside range color (outclr):
inclr(color_arg)
outclr(color_arg)
where color_arg is described below in “Color definitions”. If omitted, the interior color defaults to light-red, and the exterior defaults to white.
High-Low-Median
When “type=hilo” you may specify the high, low, and median coloring values:
highclr(color_arg)
lowclr(color_arg)
medianclr(color_arg)
where color_arg is described below in “Color definitions”. If omitted, the colors default to light-red.
Custom
 
Custom Base Color
Custom Threshold
Custom Range
When “type=custom” you may specify custom coloring options.
You may optionally set a base background color, and then add one or more custom threshold or range color specifications. Multiple threshold and range specifications will layer, with the first applied first, followed by the second, and so on.
Custom Base Color
To set the base color (optional):
clr(color_arg)
as described below in “Color definitions”. If omitted, the color defaults to “white”.
Custom Threshold
To add a threshold specification:
thresh(limit(threshold_value, threshold_spec), lowclr(below_arg), highclr(above_arg), threshold_name])
where threshold_spec is one of
cright
closed on the right
cleft
closed on the left
and the below_arg and above_arg are one of
color_arg
solid color specification
@grad(color_arg)
gradient using color specification
@trans
transparent
and color_arg are as described below in “Color definitions”. If omitted, the color defaults to “white”.
The optional threshold_name argument may be used to attach a name to the corresponding definition.
Custom Range
To add a range specification:
range(limit(low_value, high_value, range_spec), inclr(inside_arg), outclr(outside_arg)[, range_name])
where range_spec is one of
cright
closed on the right only
cboth
closed on both sides
cleft
closed on the left only
oboth
open on both sides
inside_arg is one of
color_arg
solid color specification
@grad(color_arg1, color_arg2)
gradient using color specification, where color_arg1 and color_arg2 are the low and high colors, respectively.
@trans
transparent
outside_arg is one of
color_arg
solid color specification
@grad(color_arg)
gradient using color specification
@trans
transparent
color_arg1 and color_arg2 are as described below in “Color definitions”.
The optional range_name argument may be used to attach a name to the corresponding definition.
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
To set a gray fill color for the shapes, you may use:
gmap.setfillcolor(type=single) clr(gray)
To set a fill color for negative values, you may use
gmap.setfillcolor(type=posneg) mapser(ser1)
which sets the fill color to white for non-negative values and light red for negative values of SER1.
Similarly,
gmap.setfillcolor(type=posneg) mapser(ser1) posclr(@rgb(10, 20, 30)) negclr(purple)
sets the background sheet fill color to @rgb(10, 20, 30) for non-negative values and purple for negative values of SER1.
Range coloring may be specified using the “type=range” option. The command
gmap.setfillcolor(type=range) mapser(ser1) clr(ltgray) range(10, 20, cleft) inclr(@rgb(128, 0, 128)) outclr(ltred) naclr(green)
sets the background fill to @rgb(128, 0, 128) for values between 10 and 20, light-red to values outside of the range 10 to 20, and green, for missing values.
Custom coloring allows you to construct more complex background filling:
gmap.setfillcolor(type=custom) mapser(ser1) clr(@rgb(10, 0, 0)) range(limit(-10, 10, oboth), inclr(green), outclr(white))) thresh(limit(-1, oleft), highclr(grey), lowclr(@trans))
Cross-references
See “Geomaps” for a discussion of geomaps. See “Value-Based Text and Fill Coloring” for discussion of color settings.
See also Geomap::options for options to control the shape border color and legend.
options
Set display options for a geomap object including legend and outline color.
Syntax
geomap_name.options options_list
Options
legend / -legend
Turn on and off legend.
lineclr(color_arg)
Specifies the boundary line color of the areas using the color_arg color specification.
color_arg specifies the color to be employed. 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 equivalents):
blue
@rgb(0, 0, 255)
red
@rgb(255, 0, 0)
ltred
@rgb(255, 168, 168)
green
@rgb(0, 128, 0)
black
@rgb(0, 0, 0)
white
@rgb(255, 255, 255)
purple
@rgb(128, 0, 128)
orange
@rgb(255, 128, 0)
yellow
@rgb(255, 255, 0)
gray
@rgb(128, 128, 128)
ltgray
@rgb(192, 192, 192)
Examples
gmap1.options -legend
hides the legend in the GEOMAP1 object.
gmap1.options legend lineclr(black)
displays the legend and sets the area boundary line color to black.
Cross-references
See “Geomaps” for a discussion of geomaps.
See Geomap::setfillcolor for setting the shape fill color.
setfont
Set the font for area labels in the geomap.
Syntax
table_name.setfont font_args
The font_args may include one or more of the following:
type([face], [pt], [+/- b], [+/- i], [+/- u], [+/- s])
Set characteristics of the font for the graph element type. 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.
and type is one of “all”, “axes”, “legend”, “text”, “obs”, where “axes” refers to the axes labels, “legend” refers to the graph legend, “text” refers to the text objects, “obs” refers to the observation scale, and “all” refers to all of the elements.
Examples
gmap1.setfont "Times New Roman" +i
sets the font to Times New Roman Italic.
gmap1.setfont 8pt
changes all of text in the region to 8 point.
gmap1.setfont +b -i
removes the italic, and adds boldface to the area labels.
The commands:
gmap1.setfont -s +u 14pt
gmap1.setfont "Batang" 14pt +u
he first command changes the point size to 14, removes strike-through and adds underscoring. The second changes the typeface to Batang, and adds underscoring,
Cross-references
See “Geomaps” for a discussion of geomaps.
See Geomap::setfillcolor for details on changing fill color, and Geomap::options for information on changing outline colors.
setjust
Set the horizontal justification for multi-line area labels.
Syntax
geomap_name.setjust format_arg
where format_arg may be set to left, center, right, or auto (strings are left-justified and numbers are right-justified). Default display settings can be set in General Options; see “Spreadsheet Data Display”.
Note that justification settings have no effect on single-line labels.
Examples
geo1.setjust left
left-justifies the lines in the area labels in the geomap GEO1.
Cross-references
See “Geomaps” for a discussion of geomaps.
setshapelabel
Set which attribute to use or create a custom label to use when labeling shapes in the geomap.
Syntax
geomap_name.setshapelabel(attribute_name) custom_label
where attribute_name is the name of an attributed in the geomap. In the case where attribute_name is equal to “custom”, the custom_label will be used. In all other cases, the command will be ignored.
Examples
geomap1.setshapelabel(name)
will label the areas in the GEOMAP1 geomap object using areas name attribute.
geomap1.setshapelabel (none)
turn off all area labels in the GEOMAP1 geomap object.
geomap1.setshapelabel (fillvalues)
will label the areas in the GEOMAP1 geomap object using the numerical values used for determining area fill color. This only applicable after a colormap has been applied. All values will otherwise be NA.
geomap1.Setshapelabel(custom) Area:[county],[state]\nPop:[fillvalues]
will create a custom 2 line label for the areas in the GEOMAP1 geomap object. The first line of the label will read “Area:” followed by the areas county attribute, a comma, and then the areas state. The first line will look similar to “Area:Suffolk,NY”. The second line of the label will “Pop:” followed by the value used to color the area.Examples
Cross-references
See “Geomaps” for a discussion of geomaps.
show
Shows the specified area(s) in the geomap.
Syntax
geomap_name.show area_list
where area_list is a list of areas that will be shown in addition to what is already shown. area_list may be a list of area IDs or “all.” The area ID for each area is listed in the attributes view of the geomap and corresponds to the EViews ID column.
Examples
geomap01.show 3 5 10
shows areas numbered 3, 5, and 10 in the geomap object GEOMAP1.
geomap01.show all
shows all the areas in the geomap object GEOMAP1.
Cross-references
See also Geomap::hide.
unmask
Make visible specified areas in the geomap.
Syntax
geomap_name.unmask area_list
where area_list is a space delimited integer list of the area IDs. To obtain the ID number of an area, see the @id geomap data member.
The keyword “@unlinked” may be used to specify all shapes that are not linked to observations in the workfile.
Examples
gmap1.unmask 2 4 10 20
turns on display for areas 2, 4, 10, and 20 in the geomap object GMAP1.
gmap1.unmask @unlinked
turns on display for all unlinked shapes in the shapefile.
Cross-references
See “Geomaps” for a discussion of geomaps.
See also Geomap::mask.