- x
an sf object, a simple feature collection. If x is used then spdf, df, spdfid and dfid are not.
- spdf
a SpatialPolygonsDataFrame.
- df
a data frame that contains the values to plot. If df is missing
spdf@data is used instead.
- spdfid
name of the identifier variable in spdf, default to the first column
of the spdf data frame. (optional)
- dfid
name of the identifier variable in df, default to the first column
of df. (optional)
- var
name of the variable to plot.
- col
a vector of colors.
- border
color of the polygons borders.
- lwd
borders width.
- colNA
no data color.
- legend.pos
position of the legend, one of "topleft", "top",
"topright", "right", "bottomright", "bottom", "bottomleft", "left" or a
vector of two coordinates in map units (c(x, y)). If
legend.pos is "n" then the legend is not plotted.
- legend.title.txt
title of the legend.
- legend.title.cex
size of the legend title.
- legend.values.cex
size of the values in the legend.
- legend.values.order
values order in the legend, a character vector
that matches var modalities. Colors will be affected following this order.
- legend.nodata
no data label.
- legend.frame
whether to add a frame to the legend (TRUE) or
not (FALSE).
- add
whether to add the layer to an existing plot (TRUE) or
not (FALSE).