xyz.coords {base} | R Documentation |
Utility for obtaining consistent x, y and z coordinates and labels for three dimensional (3D) plots.
xyz.coords(x, y, z, xlab=NULL, ylab=NULL, zlab=NULL, log=NULL, recycle=FALSE)
x, y, z |
the x, y and z coordinates of a set of points.
Alternatively, a single argument x can be be provided.
In this case, an attempt is made to interpret the
argument in a way suitable for plotting.
If the argument is a formula
Alternatively, two arguments |
xlab, ylab, zlab |
names for the x, y and z variables to be extracted. |
log |
character, "x" , "y" , "z" or combinations.
Sets negative values to NA and gives a warning. |
recycle |
logical; if TRUE , recycle (rep ) the
shorter ones of x , y or z if their lengths differ. |
x |
numeric (i.e. double ) vector of abscissa values. |
y |
numeric vector of the same length as x . |
z |
numeric vector of the same length as x . |
xlab |
character(1) or NULL , the axis label of x . |
ylab |
character(1) or NULL , the axis label of y . |
zlab |
character(1) or NULL , the axis label of z . |
Uwe Ligges and Martin Maechler
xy.coords
for 2D.
str(xyz.coords(data.frame(10*1:9, -4),y=NULL,z=NULL)) str(xyz.coords(1:6, fft(1:6),z=NULL,xlab="X", ylab="Y")) y <- 2 * (x2 <- 10 + (x1 <- 1:10)) str(xyz.coords(y ~ x1 + x2,y=NULL,z=NULL)) str(xyz.coords(data.frame(x=-1:9,y=2:12,z=3:13),y=NULL,z=NULL, log="xy")) ##> Warning message: 2 x values <= 0 omitted ...