plot.countries | R Documentation |
countries
objectsAs 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
## 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
)
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 |
a gg
object.
we <- countries("Western Europe")
plot(we)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.