xyz.coords package:grDevices R Documentation _E_x_t_r_a_c_t_i_n_g _P_l_o_t_t_i_n_g _S_t_r_u_c_t_u_r_e_s _D_e_s_c_r_i_p_t_i_o_n: Utility for obtaining consistent x, y and z coordinates and labels for three dimensional (3D) plots. _U_s_a_g_e: xyz.coords(x, y = NULL, z = NULL, xlab = NULL, ylab = NULL, zlab = NULL, log = NULL, recycle = FALSE) _A_r_g_u_m_e_n_t_s: x, y, z: the x, y and z coordinates of a set of points. Both 'y' and 'z' can be left at 'NULL'. In this case, an attempt is made to interpret 'x' in a way suitable for plotting. If the argument is a formula 'zvar ~ xvar + yvar', 'xvar', 'yvar' and 'zvar' are used as x, y and z variables; if the argument is a list containing components 'x', 'y' and 'z', these are assumed to define plotting coordinates; if the argument is a matrix or 'data.frame' with three or more columns, the first is assumed to contain the x values, the 2nd the y ones, and the 3rd the z ones - independently of any column names that 'x' may have. Alternatively two arguments 'x' and 'y' can be provided (leaving 'z = NULL'). One may be real, the other complex; in any other case, the arguments are coerced to vectors and the values plotted against their indices. 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. _V_a_l_u_e: A list with the components 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'. _A_u_t_h_o_r(_s): Uwe Ligges and Martin Maechler _S_e_e _A_l_s_o: 'xy.coords' for 2D. _E_x_a_m_p_l_e_s: xyz.coords(data.frame(10*1:9, -4), y = NULL, z = NULL) xyz.coords(1:6, stats::fft(1:6), z = NULL, xlab = "X", ylab = "Y") y <- 2 * (x2 <- 10 + (x1 <- 1:10)) xyz.coords(y ~ x1 + x2, y = NULL, z = NULL) 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 ...