A scatterplot or a bunch of them is produced according to the concept of the plplot package
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, ...)
None.
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.
data to be used as the y axis.
grouping factor: for each by
group, a plot will be shown
for the respective subset of the data
grouping that determines plotting symbols, colors, and line types
data.frame containing the variables if 'x' is a formula
axis labels
plot ranges
type of plot, see ?plot.default
panel function to do the actual drawing. See Details.
proportion of extreme residuals to be labeled.
If all points should be labeled, let markextremes=1
.
logical. Only applies if there are multiple y
variables. If TRUE
, the vertical axis will be adjusted
for each of these variables.
plot margins, see par
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.
result of calling pl.control
.
If NULL
, pl.control
will be called to generate it.
If not null, arguments given in ...
will be ignored.
list of pl options.
logical: Should the plargs be stored
in the pl.envir
environment?
more arguments, to be passed to pl.control
Werner A. Stahel, ETH Zurich
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.
plmatrix
, plcond
;
pl.control
, ploptions
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)
Run the code above in your browser using DataLab