Keywords - Function groups - @ A B C D E F G H I J K L M N O P Q R S T U V W X Y Z

Library: graphic
See also: grlinreg2 grsurface grcontour3 contour2

Quantlet: grcontour2
Description: Generates a contour plot from a three-dimensional data set x

Link:
Usage: gs = grcontour2 (x, c, {, col})
Input:
x n x 3 matrix, three-dimensional data.
c m x 1 vector, indicates the levels at which the function is cut.
col optional m x 1 vector, colors of the contour plot.
Output:
gs composed graphical object

Example:
library("graphic")
x  = grid(#(-3,-2.5), #(0.2,0.2), #(30,30))
f  = cos(x[,1])+sin(x[,2])^2
c  =(1:9).*max(f)./12
gs = grcontour2(x~f, c)
d  = createdisplay(1,1)
show(d, 1, 1, gs)

Result:
Shows a contour plot of a sinus-cosinus function at 9 different
cut levels.
Example:
library("graphic")
library("smoother")
x  = read("geyser")
fh = denestp(x)         ; estimate density
c  =(1:9).*max(fh[,3])./12
gs = grcontour2(fh, c)
d  = createdisplay(1,1)
show(d, 1, 1, gs)

Result:
Shows a contour plot of the estimated density of the geyser
data set at 9 different levels.



Author: S. Klinke, 19961001
(C) MD*TECH Method and Data Technologies, 05.02.2006