map.cities {maps} | R Documentation |
Adds city locations and (optionally) names to an existing map using a specified database.
map.cities(x = world.cities, country = "", label = NULL, minpop = 0, maxpop = Inf, capitals = 0, cex = par("cex"), ...)
x |
Name of database. See world.cities to determine the structure of
the database.
|
country |
If the string country is specified, limit the displayed cities to be from within the specified country. |
label |
If TRUE , label all cities. If NULL ,
the cities will be labelled unless there are 20 or more.
|
minpop |
The minimum value of population below which a particular city will not be shown. |
maxpop |
The maximum value of population above which a particular city will not be shown. |
capitals |
Selection of capitals-only display. Capitals may be 1 (country capital),
2 (provincial, state, or regional capital) or 3 (local capital). See
world.cities for further information.
|
cex |
The value of cex acts to override the current value of character size expansion. |
... |
Further plotting parameters may be specified as for the commands
points and text .
|
The database is searched for all cities matching the specified criteria and fitting within the limits of the plot currently displayed. The default database is of all cities that have a population greater than 100,000 or which are capital cities of a country or island territory. The data are from around 1980-1990.
No value is returned from map.cities.
This function is available only if no projection= has been specified in the map() call.
All cities within the boundaries of the plot containing the current map are added to the plot. Note that it is possible that the boundaries of the plot exceed the boundaries of the map requested, and so more cities than were expected might be shown.
map("world", "China") map.cities(country = "China", capitals = 2)