12.21 地形图

区域之间以轮廓分割,轮廓之间以相同的颜色填充,Cleveland 把这个叫做 level plot, lattice 包中 levelplot() 函数正来源于此。

Auckland’s Maunga Whau Volcano 是火山喷发后留下的碴堆,位于新西兰奥克兰伊甸山郊区。Ross Ihaka 收集了它的地形数据,命名为 volcano,打包在 R 软件环境中,见图 12.62

filled.contour(volcano,
  color.palette = terrain.colors,
  plot.title = title(
    main = "The Topography of Maunga Whau",
    xlab = "Meters North", ylab = "Meters West"
  ),
  plot.axes = {
    axis(1, seq(100, 800, by = 100))
    axis(2, seq(100, 600, by = 100))
  },
  key.title = title(main = "Height\n(meters)"),
  key.axes = axis(4, seq(90, 190, by = 10))
)
image 图形

图 12.62: image 图形