Description Usage Arguments Value Note See Also Examples
Geographical representation of a data frame or raster map.
1 2 3 4 5 6 7 8 9 | plotOn(x, map = ggmap::get_map(location = "trentino", zoom = 9),
latlon_crs = as.character("+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs"),
layer = 1, legend = "bottomright", title = "Soil Water Content",
label = "swc", high = "blue", low = "white", alpha = c(0.1, 0.8),
facet_wrap = FALSE, nrow = NULL, ncol = NULL, range = NULL,
scale = "continuous_2", scale.fill.gradient = TRUE, plot = TRUE,
scale_colour_gradientn_scale = NULL, extent = "normal",
method = c("bilinear", "ngb"), palette = rainbow, shape = 15,
size = NA, ...)
|
x |
a |
map |
geograghical map on which |
latlon_crs |
string containing the utilized latitude longitude Coordinate Refarance System. See default in |
layer |
brick layer utilized for geographical plotting. Default is 1. |
title |
string title of the graphic |
label |
string title (label) of the legend. It is used as the name of the scale if |
high |
colour for low end of gradient. See |
low |
colourf or high end of gradient. See |
alpha |
alpha coefficient. See http://en.wikipedia.org/wiki/Alpha_compositing. |
facet_wrap |
logical value. If |
nrow,ncol |
number of rows and columns. See |
scale |
alternative parameter to |
scale.fill.gradient |
logical value. If it is |
plot |
logical value. If |
scale_colour_gradientn_scale |
color scale for |
method |
see |
palette |
palette function used for |
shape,size |
see |
... |
further arguments |
A "ggplot"
object.
Useful link: http://journal.r-project.org/archive/2013-1/kahle-wickham.pdf
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 | library(geotopVis)
data(soilwatercontent)
x <- plotOn(x=soilwatercontent[[1]])
##' ANOTHER EXAMPLE
library(geotopbricks)
# The data containing in the link are only for educational use
wpath <- "http://www.rendena100.eu/public/geotopbricks/simulations/idroclim_test1"
tz <- "Etc/GMT-1"
when <- as.POSIXct("2002-03-22",tz=tz)
# a 2D map:
x_e <- "SnowDepthMapFile"
# Not Run: uncomment the following line
m <- rasterFromOutput2DMap(x_e,when=when,wpath=wpath,timestep="OutputSnowMaps",
tz=tz,use.read.raster.from.url=TRUE)
## NOTE: set use.read.raster.from.url=FALSE (default)
# if the "wpath" directorty is in the local file system.
# Not Run: uncomment the following line
m/10
plot(m/10,main="Snow Depth")
location = c(10.5,45.5,12.5,46.5)
map=get_map(location = location) ###, zoom = 9)
xmap <- plotOn(m/10,map=map,high="blue",low="white",title="Snow Depth",label="depth[cm]",plot=TRUE,alpha=c(0,0.3),extent="device")
xmap
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.