plotOn: Geographical representation of a data frame or raster map.

Description Usage Arguments Value Note See Also Examples

Description

Geographical representation of a data frame or raster map.

Usage

1
2
3
4
5
6
plotOn(x, map = 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 = 0.3,
  facet_wrap = FALSE, nrow = NULL, ncol = NULL, range = NULL,
  scale.fill.gradient = TRUE, scale = NULL, plot = TRUE, ...)

Arguments

x

a Raster* class object

map

geograghical map on which x is plotted. It is an object returned by get_map or similars.

latlon_crs

string containing the utilized latitude longitude Coordinate Refarance System. See default in Usage.

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 scale.fill.gradient is TRUE, otherwise it is ignored.

high

colour for low end of gradient. See scale_fill_gradient.

low

colourf or high end of gradient. See scale_fill_gradient.

alpha

alpha coefficient. See http://en.wikipedia.org/wiki/Alpha_compositing.

facet_wrap

logical value. If TRUE it uses facet_wrap to print all plots.

nrow,ncol

number of rows and columns. See facet_wrap.

scale.fill.gradient

logical value. If it is TRUE (Default), it uses scale.fill.gradient

scale

alternative parameter to scale.fill.gradient, it is a term potentially added for color scale (see scale_colour_hue o similars). It is used only if it is not NULL or scale.fill.gradient is FALSE

plot

logical value. If TRUE (Default) the function also plots the map, otherwise returns its value without any preliminary plot.

...

further arguments

Value

A \class"ggplot" object.

Note

Useful link: http://journal.r-project.org/archive/2013-1/kahle-wickham.pdf

See Also

geom_point,ggmap,facet_wrap

Examples

1
2
3
4
5
6
7
library(geographyTrentinoVis)
data(soilwatercontent)
soilwatercontent_mask <- CreateMask(raster=soilwatercontent) ## see default in Usage


x <- plotOn(x=soilwatercontent_mask)
x <- plotOn(x=soilwatercontent_mask,alpha=0.1)

ecor/geographyTrentinoVis documentation built on May 15, 2019, 8:54 p.m.