plot.CompareClassification {greenbrown}R Documentation

plot a comparison of two classification rasters

Description

This function takes an object of class CompareClassification as input and plots a map of the class agreement of two classifications.

Usage

## S3 method for class 'CompareClassification'
plot(x, xlab = "", ylab = "", main = "Classification agreement", 
    names = NULL, ul = "burlywood4", lr = "darkgreen", ll = "khaki1", 
    ur = "royalblue1", ctr = "gray87", mar = NULL, ...)

Arguments

x

Object of class CompareClassification.

xlab

A title for the x axis

ylab

A title for the y axis

main

A title for the plot

names

a list with names of the two classifications and class names. See example section for details.

ul

starting color in the upper left corner of the ColorMatrix

lr

ending color in the lower right corner of the ColorMatrix

ll

starting color in the lower left corner of the ColorMatrix

ur

ending color in the upper right corner of the ColorMatrix

ctr

color in the center of the ColorMatrix

mar

plot margins

...

Further arguments that can be passed plot.default

Author(s)

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

See Also

CompareClassification, AccuracyAssessment, TrendClassification

Examples

# Example: calculate NDVI trends from two methods and compare the significant trends

# load a raster dataset of Normalized Difference Vegetation Index
data(ndvimap)

# calculate trends with two different methods
AATmap <- TrendRaster(ndvimap, start=c(1982, 1), freq=12, method="AAT", breaks=0)
plot(AATmap)
STMmap <- TrendRaster(ndvimap, start=c(1982, 1), freq=12, method="STM", breaks=0)
plot(STMmap)

# classify the trend estimates from the two methods into 
# positive, negative and no trend
AATmap.cl <- TrendClassification(AATmap)
plot(AATmap.cl, col=brgr.colors(3))
STMmap.cl <- TrendClassification(STMmap)
plot(STMmap.cl, col=brgr.colors(3))

# compare the two classifications
compare <- CompareClassification(x=AATmap.cl, y=STMmap.cl, 
	names=list('AAT'=c("Br", "No", "Gr"), 'STM'=c("Br", "No", "Gr")))
compare

# plot the comparison
plot(compare)


[Package greenbrown version 2.4.3 Index]