Drawing maps of the polar regions can be done using square spatial maps. A small example says more than a thousand words:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
xlim = c(-180,180) ylim = c(60,90) # Some fake grid data dat_grid = expand.grid(x = xlim[1]:xlim[2], y = ylim[1]:ylim[2]) dat_grid$value = runif(nrow(dat_grid)) # Polygons data dum = map(xlim = c(-180,180), ylim = c(60,90), plot = FALSE) ant_ggplot = data.frame(dum[c("x","y")]) ant_ggplot$value = mean(dat_grid$value) # Make the square spatial map ggplot(aes(x = x, y = y, fill = value), data = dat_grid) + geom_tile() + geom_path(data = ant_ggplot) |
The final call to ggplot results in the following picture: A much more natural way of plotting…
See more ›