plyx: Scatterplot, enhanced

plyxR Documentation

Scatterplot, enhanced

Description

A scatterplot or a bunch of them is produced according to the concept of the plplot package

Usage

plyx(x = NULL, y = NULL, by=NULL, group = NULL, data = NULL, type = "p",
  panel = NULL, xlab = NULL, ylab = NULL, xlim = NULL, ylim = NULL,
  markextremes = 0, rescale = TRUE, mar = NULL, mf = FALSE,
  plargs = NULL, ploptions = NULL, assign = TRUE, ...)

Arguments

x

either a formula or the data to be used for the horizontal axis. If a formula of the type 'y~x', the variable 'y' in 'data' will be plotted against the variable(s) 'x'. If a data.frame with more than one column is given, each column will be used in turn to produce a plot.

y

data to be used as the y axis.

by

grouping factor: for each by group, a plot will be shown for the respective subset of the data

group

grouping that determines plotting symbols, colors, and line types

data

data.frame containing the variables if 'x' is a formula

xlab, ylab

axis labels

xlim, ylim

plot ranges

type

type of plot, see ?plot.default

panel

panel function to do the actual drawing. See Details.

markextremes

proportion of extreme residuals to be labeled. If all points should be labeled, let markextremes=1.

rescale

logical. Only applies if there are multiple y variables. If TRUE, the vertical axis will be adjusted for each of these variables.

mar

plot margins, see par

mf

number of multiple frames. If more than one plot will be generated because of a grouping or multiple x variables, multiple frames will be produced by calling plmframes unless mf is FALSE. If mf is TRUE, the function will determine the number of rows and columns suitably. If mf is a vector of length 2, these numbers will be used for the number of panels in rows and columns (unless they are too large for the restriction in ploptions("mframesmax")). If it has lenngth 1, this is used as the total number of panels on a page.

plargs

result of calling pl.control. If NULL, pl.control will be called to generate it. If not null, arguments given in ... will be ignored.

ploptions

list of pl options.

assign

logical: Should the plargs be stored in the pl.envir environment?

...

more arguments, to be passed to pl.control

Details

panel defaults to plpanel, which results essentially in points or text depending on the argument pch including a smooth line, to plmboxes if 'x' is a factor and 'y' is not or vice versa, or to a modification of sunflowers if both are factors.
The function must have the arguments x and y to take the coordinates of the points and may have the arguments indx and indy to transfer the two variables' indexes and panelargs for any additional objects to be passed on.

Value

None.

Note

There are many more arguments, obtained from pl.control, see ?pl.control. These can be passed to plmatrix by an argument plargs that is hidden in the ... argument list.

Author(s)

Werner A. Stahel, ETH Zurich

See Also

plmatrix, plcond; pl.control, ploptions

Examples

plyx(Petal.Width ~ Sepal.Length, data=iris)
plyx(Petal.Width ~ Sepal.Length+Sepal.Width, data=iris, smooth=TRUE,
     group=Species)
plyx(Petal.Length + Petal.Width ~ Sepal.Length+Sepal.Width,
     by  = Species, data=iris, smooth=TRUE)


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