rotecdf: Swap axis of ecdf plot and reverse y axis

rotecdfR Documentation

Swap axis of ecdf plot and reverse y axis

Description

plots points generated from an 'stats::ecdf' object with x and y axis swapped (x is cumulative frequency) and with y axis reversed so that min(y)=0 is at top. Plots points without step function lines.

Usage

rotecdf(x,target=NA,xlab=NULL,ylab=NULL,...)

Arguments

x

numeric array

target

target, a constant, e.g., target depth of irrigation.

xlab

label for x axis, standard default provided.

ylab

label for y axis, e.g., depth applied. Default is name of object x if not supplied.

...

further graphical parameters to pass to internal calls to plot.default

Details

A minimum y of 0 is forced such that the plot can be interpreted at 0 being ground surface. If 'target' is supplied, a horizontal line at the value of target is drawn. Points and area below the target line indicate water applied in excess of the target amount.

Value

rotated ecdf plot.

Note

Wrapper functions for internally called plot and sub-plot functions within 'rotecfd' prevent warnings and errors for graphical parameters passed via '...' that are not recognized by subplolot functions, i.e., abline, text. Therefore not all graphical parameters passed via '...' will be realized in the generated plot.

Author(s)

Garry Grabow glgrabow@ncsu.edu

See Also

sfplot, ecdf

Examples

target<-3
# generate data with mean of target amount and high variability (non-uniformity)
x<-rnorm(25,3,1.75)
rotecdf(x,target,ylab="depth applied (caught)")
# generate data with mean of target amount and low varibility (uniformity)
xx<-rnorm(25,3,0.5)
#no y axis label provided - defaults to array object name.  Pass additional non-default
#graphical parameters
rotecdf(xx,target,lty=2,pch=2)

spreval documentation built on March 24, 2022, 1:06 a.m.