plot.countries {necountries} | R Documentation |
Basic plot function for countries
objects
Description
As the plot
method of sf
, this function is intended to obtain
quickly a map for a set of countries. Countries' boundaries are
represented and filling can be used, some cities can also be
represented and labels can be added. ggplot
is used and should be
used directly when more enhanced maps are required
Usage
## S3 method for class 'countries'
plot(
x,
...,
labels = NULL,
fill = NULL,
capital = NULL,
centroid = NULL,
bks = NULL,
n = 6,
style = NULL,
palette = NULL,
bw = FALSE
)
Arguments
x |
a |
... |
further arguments (currently unused) |
labels |
a character vector containing the variables that
should be labeled: |
fill |
a variable use to fill countries' polygons |
capital , centroid |
a variable associated with the shape or the size of points |
bks |
an optional vector of breaks in order to use a continuous variable for fill |
n |
the number of class (passed to |
style |
the style (passed to |
palette |
the palette (selected in |
bw |
a boolean, if |
Value
a gg
object.
Examples
we <- countries("Western Europe")
plot(we)