rm(list=ls()) library(SpatialExtremes) data(rainfall) ## We are going to plot a bunch of circle centered at weather ## stations, whose radius is proportional to the deviation from the ## areal mean and whose color is blue or red depending if we're below ## or above the areal mean ## Plot Switzerland usign an existing function---always a good idea to ## start with that swiss(city = TRUE) ## Do actually the symbol plot areal.mean <- mean(rain) pointwise.mean <- colMeans(rain) col <- c("red", "blue")[2 - (pointwise.mean >= areal.mean)] radius <- 0.5 * abs(pointwise.mean - areal.mean) symbols(coord[,-3], circles = radius, inches = FALSE, add = TRUE, bg = col)