plpoints {plgraphics}R Documentation

Low level plotting functions for the 'pl' system

Description

These functions do the plotting of points and enhancing lines based on the 'pl' paradigm

Usage

plpoints(x=NULL, y=NULL, type="p", plab=NULL, pch=NULL, col=NULL, lcol=col,
  lty=NULL, lwd=NULL, psize=NULL,
  plargs = NULL, ploptions = NULL, setpar = TRUE, ...)

pllines(x, y, type="l", ...)

plbars(x, y, plargs = NULL, ploptions = NULL)

plsmooth(x, y, band=NULL, power = NULL, plargs = NULL, ploptions = NULL)
plsmoothline(smoothline, x, y, plargs=NULL, ploptions = NULL, ...)

plrefline(refline, x=NULL, innerrange=NULL, y=NULL,
  cutrange = c(x = TRUE, y = FALSE), plargs=NULL, ploptions=NULL, ...)

plmark(x, y=NULL, markextremes=NULL, plabel=NULL,
  plargs=NULL, ploptions=NULL)

Arguments

x

coordinates for the horizontal axis

y

coordinates for the vertical axis

plab

labels for displaying points. Overrides labels provided by plargs$pdata[["plab"]].

col

color points

lcol

color for lines

type

type of displaying points. See ?points.

pch, psize, lty, lwd

... and col in plpoints: plotting character(s), size and color of plotting points, and line type. Overrides other settings, defined in plargs.

smoothline

for plsmoothline: result of a smooth fitting

band

logical: should a band (e.g., a confidence band) be drawn together with the smooth?

power

for plsmooth: smooth will be calcutated for y^power and the back-transformed. Usually, power=0.

refline

for plrefline: A vector giving intercept and slope of a straight line, or a function that returns this list, such as lm

innerrange

for plrefline: inner range in x direction - only needed of the refline should be clipped at a range different from the innerrange attribute of the horizontal variable

cutrange

for plrefline: logical vector of length 2: should the reference line(s) be cut at the inner plotting ranges in x- and y-direction? Otherwise, it will be continued outside it with the appropriate transformation.

markextremes

proportion of observations that should be labeled because they show extreme values for a variable

plabel

point labels to be used to mark extreme points

plargs, ploptions

result of pl.control, see Details

setpar

logical: should graphical parameters cex, mar, mgp be set according to ploptions?

...

absorbs extra arguments

Details

plargs and ploptions may be specified explicitly, but they are usually generated by calling pl.control.

For plpoints, the first arguments, x and y can be formulas, and an argument data can be given. These arguments then have the same meaning as in plyx

Value

plpointsinvisibly returns the former par("mar") if setpar is TRUE, otherwise NULL.

plsmooth invisibly returns the data.frame needed for drawing the smooth line.

!!!

Author(s)

Werner A. Stahel

See Also

pl.control

Examples

plyx(Sepal.Width ~ Sepal.Length, data=iris)

## again, each step separately
t.dt <- .plargs$pldata
.plargs$grid <- TRUE
plframe(t.dt$Sepal.Length, t.dt$Sepal.Width, plargs=.plargs)
plsmooth(t.dt$Sepal.Length, t.dt$Sepal.Width, plargs=.plargs)
t.plab <- plmark(t.dt$Sepal.Length, t.dt$Sepal.Width, markextremes=0.03,
                 plargs=.plargs)
plpoints(t.dt$Sepal.Length, t.dt$Sepal.Width, plargs=.plargs, plab=t.plab) 

[Package plgraphics version 1.0 Index]