plpoints: Plot Points and Lines in the 'pl' system

plpointsR Documentation

Plot Points and Lines in the 'pl' system

Description

Low level functions for plotting point and lines based on the 'pl' paradigm.

Usage

plpoints(x=NULL, y=NULL, type="p", plab=NULL, pch=NULL,
  pcol=NULL, col=NULL, lcol=NULL, lty=NULL, lwd=NULL, psize=NULL,
  csize = NULL, group = NULL, plargs = NULL, ploptions = NULL,
  marpar = NULL, xy = TRUE, ...)

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

Arguments

x, y

coordinates for the horizontal and veritical axis, respectively. If NULL, they will be retrieved from plargs$pldata.

type

type of displaying points. See ?points.

plab

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

pcol, col

color for points. col is used if pcol is NULL

lcol

color for lines

pch, psize, csize, lty, lwd

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

group

grouping of observations, used to determine pch and col

plargs, ploptions

result of pl.control, see Details

marpar

margin parameters, if already available. By default, they will be retieved from ploptions.

xy

logical: should the coordinates be obtained as in high level graphics? This is set to FALSE to save time and avoid complications, in case the user is sure that x and y are vectors rather than formulas or variable names.

...

absorbs extra arguments

Details

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.

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

Value

plsmooth invisibly returns the data.frame needed for drawing the smooth line. The other functions return NULL

Author(s)

Werner A. Stahel

See Also

pl.control

Examples

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

da <- aggregate(iris[,1:4], list(Species=iris$Species), mean)
plpoints(Sepal.Width ~ Sepal.Length, plargs=list(pldata=da),
  plab=da$Species, csize.pch=1, pcol=as.numeric(da$Species))

plgraphics documentation built on Oct. 19, 2023, 3 p.m.