Learn R Programming

robustbase (version 0.9-6)

plot-methods: Plot an Object of the "Psi Function" Class

Description

The plot method objects of class psi_func simply visualizes the $\rho()$, $\psi()$, and weight functions and their derivatives.

Usage

## S3 method for class 'psi_func':
plot(x, y,
     which = c("rho", "psi", "Dpsi", "wgt", "Dwgt"),
     shortMain = FALSE,
     col = c("black", "red3", "blue3", "dark green", "light green"),
     leg.loc = "right", ...)

Arguments

x
object of class psi_func to be plotted
y
(optional) vector of abscissa values (to plot object at).
which
character vector of slots to be included in plot; by default, all of the slots are included
shortMain
use short or long plot title
col
colors to be used for the different slots
leg.loc
legend placement, see also x argument of legend
...
passed to matplot

See Also

psiFunc() and the class psi_func.

Examples

Run this code
plot(huberPsi)
plot(huberPsi, which=c("psi", "Dpsi", "wgt"),
     shortMain=TRUE, leg = "topleft")

plot(hampelPsi)
## Plotting aspect ratio = 1:1 :
plot(hampelPsi, asp=1, shortMain=TRUE,
     which = c("psi", "Dpsi", "wgt", "Dwgt"))

Run the code above in your browser using DataLab