2-D scatter plot with trajectories
This function represents a two dimensional scatter plot with trajectories.
s.traject(dfxy, fac = gl(1, nrow(dfxy)), order, labels = levels(fac), xax = 1, yax = 2, col = NULL, facets = NULL, plot = TRUE, storeData = TRUE, add = FALSE, pos = -1, ...)
dfxy |
a data frame used to produce the plot |
fac |
a factor (or a matrix of factors) splitting the rows of |
order |
a vector containing the drawing order of the trajectories. A vector of length equal to factor. |
labels |
a vector of character strings containing the trajectories' labels |
xax |
an integer (or a vector) indicating which column(s) of |
yax |
an integer (or a vector) indicating which column(s) of |
col |
a color or a colors vector to color points, labels and lines |
facets |
a factor splitting the rows of |
plot |
a logical indicating if the graphics is displayed |
storeData |
a logical indicating if the data should be stored in
the returned object. If |
add |
a logical. If |
pos |
an integer indicating the position of the
environment where the data are stored, relative to the environment
where the function is called. Useful only if |
... |
additional graphical parameters (see
|
The fac
factor is used to display several trajectories: each level of fac
is a specific trajectory.
An object of class ADEg
(subclass S2.traject
) or ADEgS
(if add
is TRUE
and/or
if facets or multidimensional fac
or vectors for xax
/yax
are used).
The result is displayed if plot
is TRUE
.
Alice Julien-Laferriere, Aurelie Siberchicot aurelie.siberchicot@univ-lyon1.fr and Stephane Dray
rw <- function(a) { x <- 0 for(i in 1:49) x <- c(x, x[length(x)] + runif(1, -1, 1)) x } x1 <- unlist(lapply(1:5, rw), use.names = FALSE) y1 <- unlist(lapply(1:5, rw), use.names = FALSE) z1 <- gl(5, 50) g1 <- s.traject(data.frame(x1, y1), z1, ppoints.pch = 19:23, plines.col = rainbow(5)) x2 <- unlist(lapply(1:2, rw), use.names = FALSE) y2 <- unlist(lapply(1:2, rw), use.names = FALSE) z2 <- gl(2, 50) g2 <- s.traject(data.frame(x2, y2), z2, ppoints.pch = 21:20, plines.col = 1:2)
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.