Description Usage Arguments Examples
grid_view_level
1 |
grid |
|
level |
|
alpha |
|
color_p |
|
color_n |
|
... |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 | ##---- Should be DIRECTLY executable !! ----
##-- ==> Define data, use random,
##-- or do help(data=index) for the standard data sets.
## The function is currently defined as
function (grid, level, alpha = 1, color_p = PT.Color[["O"]],
color_n = PT.Color[["N"]], ...)
{
positive_present <- FALSE
negative_present <- FALSE
for (igridx in 1:grid$ngridx) {
for (igridy in 1:grid$ngridy) {
for (igridz in 1:grid$ngridz) {
v <- grid$val[igridx, igridy, igridz]
if (v > level) {
positive_present <- TRUE
}
if (-v > level) {
negative_present <- TRUE
}
if (positive_present && negative_present)
break
}
}
}
val <- grid$val
if (positive_present) {
contour3d(grid$val, level, grid$gridx, grid$gridy, grid$gridz,
color = color_p, add = TRUE, alpha = alpha, ...)
}
if (negative_present) {
contour3d(-val, level, grid$gridx, grid$gridy, grid$gridz,
color = color_n, add = TRUE, alpha = alpha, ...)
}
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.