Plot a "pfGridding" object.

Description

Plot maps presenting gridded and transformed charcoal values obtained from the pfGridding function.

Usage

1
2
3
4
5
## S3 method for class 'pfGridding'
plot(x, continuous = TRUE, col_class = NULL,
  col_lim = NULL, xlim = NULL, ylim = NULL, empty_space = 10,
  cpal = "YlGn", anomalies = TRUE, file = NULL, points = FALSE,
  add = NULL, add_color = "white", plot_countries = FALSE, ...)

Arguments

x

An object returned by pfGridding.

continuous

Logical, plot continuous (TRUE) or discrete (FALSE) colors on the map.

col_class

Numeric, if continuous is false define here color classes (single values: col_class=5, or sequences col_class=seq(-15,15,5) are accepted.)

col_lim

Numeric, limits for plotting grid cells values, grid cells with values beyond col_lim are not plotted.

xlim

Numeric, map limits.

ylim

Numeric, map limits.

empty_space

Percentage, define empty space around the map.

cpal

String, color palette to use see brewer.pal

anomalies

Logical, adapt output for plotting anomalies or not (color classes, etc..)

file

Path/Filename.tiff, the function can output a GeoTiff file if desired.

points

Logical, plot charcoal sites on the map?

add

An object of the class "SpatialPolygonsDataFrame" (sp) to be ploted on the map.

add_color

Color of the added SpatialPolygonsDataFrame.

plot_countries

Logical, default FALSE (if TRUE plot countries borderlines and coastlines)

...

...

Value

A ggplot2 "gg" object that could be further manipulated.

Author(s)

O. Blarquez

See Also

pfGridding

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
## Not run: 
ID=pfSiteSel(id_region=="ENA0", l12==1, long>-85)

TR=pfTransform(ID,method=c("MinMax","Box-Cox","Z-Score"),BasePeriod=c(200,4000))

p=pfGridding(TR,age=1000)

plot(p,empty_space=100)

# require(ggplot2)
# pp=plot(p,empty_space=100)
# pp+ggtitle("my title..")

## End(Not run)

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.