Library: | graphic |
See also: | grsurface |
Macro: | grcube | |
Description: | Generates a 3-D cube with labels at the axes surrounding a 3-dimensional dataset. |
Usage: | gc = grcube(x{,m{,form}}) | |
Input: | ||
x | n x 3 matrix | |
m | 3 x 1 vector or scalar, numbers of labels for each of the axes | |
form | 3 x 1 string vector or 1 string, the formatstring(s) for the axes x, y and z | |
Output: | ||
gc | composed graphical object: gc.box : box around the data gc.x : label for the x-axes gc.y : label for the y-axes gc.z : label for the z-axes gc.c : label for the corners |
library("graphic") m = matrix(3)* 5 form = "%.2f" | "%.2f" | "%.3f" x = grid (#(-3,-3), #(0.12,0.12), #(31,31)) f = exp(-0.5.*(x[,1]^2+x[,2]^2))./(2.*pi) gc = grcube(x~f,m,form) gs = grsurface(x~f) di = createdisplay(1,1) show(di,1,1,gs,gc.box,gc.x,gc.y,gc.z,gc.c)
shows a surface surrounded by a cube with labels
Library: | graphic |
See also: | grsurface |