plot.ObjFct: Plot objective functions

Description Usage Arguments Details Author(s) References See Also Examples

Description

Barplot or scatterplot of objective function metrics. A barplot is created if only one metric is defined in which. A scatterplot is created if two metrics are defined.

Usage

1
2
3
4
## S3 method for class 'ObjFct'
plot(x, which = c("Cor", "KS", "AE"), alpha = 0.1, cols = "black", 
    pch = NULL, legend = TRUE, xlab = NULL, ylab = NULL, xlim = NULL, 
    ylim = NULL, txt = NULL, add = FALSE, ...)

Arguments

x

an object of class ObjFct

which

Which objective function metrics should be plotted? If one metric is defined, a barplot will be plotted. If more than one metric is defined, the first metric will be used for the x-axis and the second metric for y-axis of a scatterplot. If a third metric is specified, point sizes in the scatterplot will be scaled.

alpha

significance level to plot objetive functions that are not significant different from the optimum with different point symbols. This only works if the the selected objective functions in which have a p-value. Set to NULL to avoid this option.

cols

colors for the groups

pch

point symbols for scatterplots or for pointsplots (instead of barplot)

legend

plot a legend for the significance point symbols?

xlab

label for x-axis

ylab

label for y-axis

xlim

limits for x-axis

ylim

limits for y-axis

txt

text for the points

add

add plot to an existing plot? This only works for scatterplots.

...

further arguments to plot

Details

No details.

Author(s)

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

References

No reference.

See Also

ObjFct, TaylorPlot, ScatterPlot, WollMilchSauPlot

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# create some data
obs <- 1:300
sim <- obs * c(rnorm(100, 1, 0.1), rnorm(100, 1, 0.3), rnorm(100, 1, 0.5))
groups <- c(rep("subset 1", 100), rep("subset 2", 100), rep("subset 3", 100))
ScatterPlot(sim, obs, groups, objfct=TRUE)

of <- ObjFct(sim, obs, groups)
of 

# default plot
plot(of)

# barplots with only one metric
plot(of, "Cor")
plot(of, "AE")
plot(of, "MEF")

# options for the scatterplot:
plot(of, c("Cor", "RMSE", "MEF"))
plot(of, c("Spearman", "KS"), alpha=0.05)
plot(of, c("Spearman", "KS"), alpha=NULL)
plot(of, cols=c("black", "red", "blue", "green"))
plot(of, c("Cor", "FV"), pch=0:4)

ModelDataComp documentation built on Nov. 22, 2020, 3 a.m.