Plots - Generic function

DESCRIPTION:

Creates a plot on the current graphics device.

This function is an S Version 3 generic (see Methods); method functions can be written to handle specific S Version 3 classes of data. Classes which already have methods for this function include:

data.frame , design, factor, formula, gam, glm, lm, loess , preplot.gam, preplot.loess, profile, stl, surv.fit, times , tree, tree.sequence.

USAGE:

plot(x, ...) 

REQUIRED ARGUMENTS:

x
an S-PLUS object.

OPTIONAL ARGUMENTS:

...
methods may have additional arguments.

Graphical parameters may also be supplied as arguments to this function (see par ). In addition, the high-level graphics arguments described under plot.default and the arguments to title may be supplied to this function.

SIDE EFFECTS:

a plot is created on the current graphics device.

DETAILS:

Generates plots summarizing the distribution of the variables on the current graphics device.

REFERENCES:

Chambers, J. M., Cleveland, W. S., Kleiner, B. and Tukey, P. A. (1983). Graphical Methods for Data Analysis. Wadsworth, Belmont, California.

Cleveland, W. S. (1985). The Elements of Graphing Data. Wadsworth, Monterey, California.

The Cleveland reference is a clear and useful book with many hints about how to create more effective graphics. Chambers, et al. details many of the techniques that are most useful for data analysis.

SEE ALSO:

points , lines , text , title , axes , legend , axis , abline , box , arrows , segments , symbols , mtext , matplot , tsplot , usa , par , frame .

EXAMPLES:

plot(corn.rain, corn.yield) # simple scatter plot 
plot(1:10, type="b", lty=2, pty=7) 
plot(wafer) # use plot.design to get a picture of the effects of factors 
plot.factor(wafer) # get several plots showing the effect of one factor 
population <- state.x77[,"Population"] 
area <- state.x77[,"Area"] 
plot(area, population, log="xy", xlab="Area in square miles", 
      ylab="Population in thousands") 
states.lab <- c("Alaska", "California", "Florida", "Hawaii", "New Jersey", 
      "New York", "Rhode Island", "Texas", "Wyoming") 
text(area[states.lab], population[states.lab],  
      paste(" ", states.lab, sep=""), adj=0)