Library: | spatial |
See also: | SPKRsurfls SPKRsurfgls SPKRexpcov SPKRgaucov SPKRsphercov SPKRtrmat SPKRprmat SPKRsemat SPKRcorrelogram SPKRvariogram |
Quantlet: | SPKRmultcontours | |
Description: | draws multiple contour lines of a spatial object of type "trmat", "prmat", or "semat" |
Usage: | res = SPKRmultcontours(disp, pos1, pos2, obj, start, end, step) | |
Input: | ||
disp | display, in which the contour lines should be shown | |
pos1 | scalar, row of the display | |
pos2 | scalar, column of the display | |
obj | list, (of type "trmat", "prmat", or "semat") calculated by SPKRtrmat, SPKRprmat, or SPKRsemat | |
start | scalar, starting value for contour lines | |
end | scalar, ending value for contour lines | |
step | scalar, step width between two contour lines | |
Output: | ||
res | n x 2 matrix, contains all points at all levels of the contour lines |
; loads the spatial statistics library library("spatial") ; reads a spatial data set topo = read("topo.dat") ; calculates a polynomial regression surface of order 2 myres = SPKRsurfls(2, topo) ; calculates a 30 x 30 grid within [0, 6.5] x [0, 6.5] ; using trend surface myres mygrid = SPKRtrmat(myres, 0, 6.5, 0, 6.5, 30) ; creates a display and draws contour lines in the range ; 750 through 975, using steps of width 25 disp = createdisplay(1, 1) cont = SPKRmultcontours(disp, 1, 1, mygrid, 750, 975, 25)
A plot of multiple countour lines is drawn and the corresponding points are returned.