addpoints | R Documentation |
addpoints given a matrix or data.frame, which must contain fields names 'Lat' and 'Long', these value pairs will be added to the plot generated by plotaus
addpoints(
indat,
inpch = 20,
incex = 0.2,
incol = 2,
intitle = "",
jit = F,
wobble = 1,
refill = T,
Long = "Long",
Lat = "Lat",
txtout = TRUE,
namecatch = "catch_kg"
)
indat |
a matrix or data.frame containing, at least, columns with the names 'Long' nad 'Lat'. |
inpch |
default = 20, but can be changed to any valid symbol |
incex |
default 0.2, but can be a constant or variable |
incol |
default 2 (red) but can be any colour or rgb definition |
intitle |
main top center title, the same as in plotaus; this is mostly useful if the refill variable is set to TRUE |
jit |
default FALSE. If TRUE it will jitter the outcome by the 'wobble' valriable amount. However, for overlapping points it is often better to use an rgb colour with the last value set to a fraction e.g. incol=rgb(9)0,0,0,1/5) |
wobble |
the amount to jitter a point id jit = TRUE |
refill |
default TRUE, refill the land after plotting points. |
Long |
used to define the longitude field; defaults to 'Long' |
Lat |
used to define the Latitude field; default to 'Lat' |
txtout |
logical determines whether the number of points added and \ their range will be printed to the screen; defaults to TRUE |
namecatch |
is the name of the catch variable; defaults to 'catch_kg' |
adds the input points to a map; returns nothing.
dev.new(height=6.0,width=7.5,noRStudioGD = TRUE)
plotaus()
Long <- c(140,141,142,143)
Lat <- c(-41.1,-41.1,-41.1,-41.1)
indata <- cbind(Long,Lat)
addpoints(indata,incex=1.5)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.