points_color | R Documentation |
Plot points with color
points_color(
x,
y,
z,
col = hcl.colors(41, "Blue-Red"),
zlim = range(z),
pch = 19,
cex = 1,
outside = TRUE,
verbose = F,
...
)
x |
x-axis coordinate |
y |
y-axis coordinate |
z |
values |
col |
color |
zlim |
custom zlim |
pch |
passed to points |
cex |
passed to points |
outside |
to include values outside zlim |
verbose |
to display additional information |
... |
other arguments passed to points and value2color |
library(raster)
## some maps to include
masp <- raster::shapefile(paste0(system.file("extdata",package="hackWRF"),
"/RMSP.shp"))
br <- raster::shapefile(paste0(system.file("extdata",package="hackWRF"),
"/BR_states.shp"))
## site-list w/ lat-lon
stations <- readRDS(paste0(system.file("extdata",package="hackWRF"),
"/stations.Rds"))
## open a evaluation table
sample <- read.stat(paste0(system.file("extdata", package = "hackWRF"),
"/sample.csv"),verbose=TRUE)
row.names(sample) <- c("Americana","Campinas","Congonhas")
## combination of lat-lon and evaluation table
coord <- latlon(sample, coord = stations)
## plot
plot(NA, xlim = c(-47.75,-45.5), ylim = c(-24.7,-22.2),
xlab = 'lon',ylab = 'lat')
points_color(x = coord$lon, y = coord$lat,z = coord$MB)
lines(masp, col = 'gray');lines(br)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.