2026-03-03
This chapter contains advice and guidelines. Dr. Munzner says:
“Each of them has a catchy title in hopes that you’ll remember it as a slogan.”
The 8 Rules of Thumb:
See ?filled.contour (base R).
x <- 10 * (1:nrow(z)) # 10 meter spacing (S to N)
y <- 10 * (1:ncol(z)) # 10 meter spacing (E to W)
## Don't draw the grid lines : border = NA
par(bg = "slategray3",
mar = c(0, 0, 3, 0))
persp(x, y, z, theta = 135, phi = 30, col = "green3", scale = FALSE,
ltheta = -120, shade = 0.75, border = NA, box = TRUE,
main = "Maunga Whau Volcano")See ?persp (base R).
library(rgl)
z <- 3 * volcano # Exaggerate the relief
x <- 10 * (1:nrow(z)) # 10 meter spacing (S to N)
y <- 10 * (1:ncol(z)) # 10 meter spacing (E to W)
zlim <- range(z)
zlen <- zlim[2] - zlim[1] + 1
colorlut <- terrain.colors(zlen) # height color lookup table
col <- colorlut[ z - zlim[1] + 1 ] # assign colors to heights for each point
par3d(windowRect = c(34, 57, 727, 707))
surface3d(x, y, z, color = col, back = "lines")See ?surface3d (package rgl).




volcano) is rarely a problem.
“Our visual system works so well that most people have the intuition that we have detailed internal memory of our visual field. However, we do not.”
“For example, experimenters set up a real-world interactoin where somebody was engaged by a stranger who asked directions, only to be interrupted by people carrying a door who barged in between them. The experimenters orchestrated a switch during this visual interruption, replacing the questioner with another person. Remarkably, most people did not notice, even when the new questioner was dressed completely differently — or was a different gender tahn the old one!”