scatter: scatterplot with optional information on the errors between x...

Description Usage Arguments Value Examples

View source: R/plot_templates.r

Description

This scatterplot is a wrapper function for a ggplot-based plot. It containes additional text panel that shows values calculated with calc.error

Usage

1
2
3
4
5
scatter(x, y, by = NULL, axisorder = "PO", xlab = "Observed",
  ylab = "Predicted", title = NULL, info = T, position = 0,
  positionauto = T, lowerlimit = NA, upperlimit = NA, alpha = 1,
  add.reg.line = F, rug = F, label_text = c("n", "bias", "bias%", "RMSE",
  "RMSE%"))

Arguments

x

a vector of observed data.

y

a vector of predicted data.

by

optional grouping variable. Can be character or factor

axisorder

Optional. Set to PO (predicted-observed) to plot predicted (y) on the y-axis (this is the default). Set to OP (observed-predicted) to plot observed (x) on the y-axis.

xlab

Optional. Title of the x-axis

ylab

Optional. Title of the y-axis

info

A logical value indictating whether information on count, bias and RMSE should be added to the plot.

position

Determines the position of the info box

positionauto

A logical value indicating whether the position of the info box should be optimized automaticaly.

lowerlimit

A value determining the lower limit of the x and y axis

upperlimit

A value determining the upper limit of the x and y axis

alpha

Define the transparency of the points. 0 - fully transparent, 1 - opaque.

add.reg.line

Logical. Should the regression line be added to the plot? Regression coeficients are calculated automatically.

rug

Logical. Add marginal rug to the plot.

label_text

A character vector of length=5 defining the names for the values in the info box.

Value

a scatterplot of x and y.

Examples

1
2
3
x <- iris$Sepal.Length
y <- predict(lm(data=iris,iris$Sepal.Length~iris$Petal.Width))
scatter(x,y)

ptompalski/UsefulRFunctions documentation built on May 26, 2019, 11:32 a.m.