Description Usage Arguments Value Author(s)
Create a static map
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | point_map(
pts,
by = NULL,
map_proj = RT90(),
basemap = "NUTS_20M",
path_to_file = tempfile(fileext = ".pdf"),
height = 7,
width = 5,
pch = 20,
col = c("#67841E"),
cex = 1,
border_col = "grey30",
border_lwd = 0.5,
legend = FALSE,
legend_labs = levels(pts@data[, by]),
legend_position = c(1150405, 7532675),
legcex = 1
)
|
pts |
a spatialopointsdataframe |
by |
an optional argument indicating the value to use to assign colours. A factor. |
map_proj |
The projection of those output map (represented in proj4string) |
basemap |
The name of the basemap |
path_to_file |
The output file |
height |
The height in inches |
width |
The width in inches |
pch |
The plotting character |
col |
The col of the plotting character. If 'by' is specified then it should be a vector with length == levels(by) |
cex |
The size of the plotting character |
border_col |
the colour of the polygon borders |
border_lwd |
The thicknes of the polygon borders |
legend |
Want a legend ? TRUE or FALSE |
legend_labs |
A vector of the legend labels. Default is the levels of the by variable. There must be a by variable to get a legend |
legend_position |
The x y position of the legend in the same coordinate system as the map |
legcex |
The size of the legend text |
A path to the pdf file of the map
Thomas Rosendal
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.