dots: Plot dots on a map

Description Usage Arguments Details Value Note Author(s) References See Also Examples

View source: R/00_S3_Definitions.R

Description

Plot points on a map with different colors and shapes.

Usage

1
2
3
dots(x, points, color="red", size = 8, value = NULL,
    breaks = NULL, steps = 5, palette = NULL, labels = NULL, strate = NULL,
    title="", subtitle = "", caption  = "", legend = NULL, note=NULL)

Arguments

x

Object gadm_sp or gadm_sf

points

Object data.frame with columns 'latitude' and 'longitude'

color

a valid color

size

integer size of point

value

Character Name of a column in the data.frame. If is not null, colored dots are displayed according to the value.

breaks

vector of breaks

steps

Integer Number of breaks for the value field.

palette

a valid palette

labels

vector of labels

strate

Character name of a column in the data.frame. If is not null, display dots with different shapes according to the value.

title

Character title of the plot

subtitle

Character subtitle of the plot

caption

Character caption of the plot

legend

Character The title of the legend

note

Character Add an annotation

Details

—-

Value

Object ggplot2

Note

—-

Author(s)

Jean Pierre Decorps <jp.decorps@epiconcept.fr>

References

—-

See Also

RColorBrewer

Examples

1
2
3
4
5
6
7
8
9
library(GADMTools)
data("Corsica")

longitude <- runif(6, min=8.74, max = 9.25)
latitude  <- runif(6, min=41.7, max = 42.6)
Cases <- runif(6, 25, 112)
DAT <- data.frame(longitude, latitude, Cases)

dots(Corsica, DAT, color="red", size = 8, value = "Cases")

IamKDO/GADMTools documentation built on Aug. 23, 2021, 5:14 a.m.