MapBreakpoints {greenbrown}R Documentation

Plot map of breakpoints

Description

This function plots a map of breakpoints or adds breakpoints as points and text to map of trends.

Usage

MapBreakpoints(bp.r, add = TRUE, add.text = TRUE, ntext = NULL, 
    breaks = NULL, col = NULL, cex = 0.6, lwd = 0.6, pch = 1, 
    format.text, ...)

Arguments

bp.r

raster layer with breakpoints as computed with TrendRaster.

add

add breakpoint map to actual map (default TRUE)

add.text

add text (i.e. year of breakpoint) to regional groups of breakpoints

ntext

number of regional groups of breakpoints that should be labelled with text

breaks

class breaks to color breapoints (if NULL will be computed automatically)

col

colors for breakpoints

cex

size of point symbols

lwd

line width of point symbols

pch

type of point symbol

format.text

format of the text if add.text=TRUE, default: %y

...

further arguments for plot

Value

The function returns a list with class colors and breaks that was used for plotting

Author(s)

Matthias Forkel <matthias.forkel@geo.tuwien.ac.at> [aut, cre]

See Also

TrendRaster, TrendSegmentsRaster

Examples

# load a multi-temporal raster dataset of Normalized Difference Vegetation Index
data(ndvimap)
ndvimap
plot(ndvimap, 8)

# calculate trend and breakpoints
AATmap <- TrendRaster(ndvimap, start=c(1982, 1), freq=12, method="AAT", breaks=1)
plot(AATmap)

# plot trend slope and add breakpoints
bp.r <- raster(AATmap, grep("BP1", names(AATmap)))
plot(AATmap, grep("SlopeSEG1", names(AATmap)), col=brgr.colors(15))
MapBreakpoints(bp.r)

plot(AATmap, grep("SlopeSEG1", names(AATmap)), col=brgr.colors(15))
lgd <- MapBreakpoints(bp.r, format.text="%Y", ntext=10, cex=0.8)



[Package greenbrown version 2.4.3 Index]