Learn R Programming

RobAStBase (version 0.7.1)

plot-methods: Methods for Function plot in Package `RobAStBase'

Description

plot-methods

Usage

plot(x, y, ...)
## S3 method for class 'IC,missing':
plot(x, ..., withSweave = getdistrOption("withSweave"),
             main = FALSE, inner = TRUE, sub = FALSE,
             col.inner = par("col.main"), cex.inner = 0.8,
             bmar = par("mar")[1], tmar = par("mar")[3],
             mfColRow = TRUE, to.draw.arg = NULL)
## S3 method for class 'IC,numeric':
plot(x, y, ..., cex.pts = 1,
                            col.pts = par("col"), pch.pts = 1, jitter.fac = 1,
                            with.lab = FALSE, lab.pts = NULL, lab.font = NULL,
             which.lbs = NULL, which.Order  = NULL, return.Order = FALSE)

Arguments

docType

methods

Details

Any parameters of plot.default may be passed on to this particular plot method. We start describing the IC,missing-method: For main-, inner, and subtitles given as arguments main, inner, and sub, top and bottom margins are enlarged to 5 resp. 6 by default but may also be specified by tmar / bmar arguments. If main / inner / sub are logical then if the respective argument is FALSE nothing is done/plotted, but if it is TRUE, we use a default main title taking up the calling arguments in case of main, default inner titles taking up the class and (named) parameter slots of arguments in case of inner, and a "generated on "-tag in case of sub. Of course, if main / inner / sub are character, this is used for the title; in case of inner it is then checked whether it has correct length. In all title arguments, the following patterns are substituted: [object Object],[object Object],[object Object] If argument ... contains argument ylim, this may either be as in plot.default (i.e. a vector of length 2) or a vector of length 2*(number of plotted dimensions + 2), where the first two elements are the values for ylim in panel "d", the first two are for ylim resp. xlim for panels "p" and "q", and the last 2*(number of plotted dimensions) are the values for ylim for the plotted dimensions of the L2derivative, one pair for each dimension. The IC,numeric-method calls the IC,missing-method but in addition plots the values of a dataset into the IC.

Examples

Run this code
IC1 <- new("IC")
plot(IC1)
plot(IC1, main = TRUE, panel.first= grid(),
     col = "blue", cex.main = 2, cex.inner = 1)

### selection of subpanels for plotting
N <- NormLocationScaleFamily(mean=0, sd=1) 
IC2 <- optIC(model = N, risk = asCov())
par(mfrow=c(1,1))
plot(IC2, main = TRUE, panel.first= grid(),
     col = "blue", cex.main = 2, cex.inner = 0.6,
     mfColRow = FALSE, to.draw.arg=c("sd"))

## xlim and ylim arguments
plot(IC2, main = TRUE, panel.first= grid(), 
     ylim=c(-3,3), xlim=c(-2,3))
plot(IC2, main = TRUE, panel.first= grid(), 
     ylim=c(-3,3,-1,3), xlim=c(-2,3))

data <- r(N)(30)
plot(IC2, data, panel.first= grid(),
     ylim = c(-3,3,-1,3), xlim=c(-2,3),
     cex.pts = 3, pch.pts = 1:2, col.pts="green",
     with.lab = TRUE, which.lbs = c(1:4,15:20),
     which.Order = 1:6, return.Order = TRUE)

Run the code above in your browser using DataLab