allAustralia: Australian overview plots

Description Usage Arguments Details Examples

View source: R/allAustralia.R

Description

This function provides the backbone for the Australian overview plots. In essence, it provides the map and the locations where to add insets. Also allAustraliaKey offers the additional functionality of placing a legend in the bottomleft corner.

Usage

1
2
3
4
allAustralia(fun, bg = NULL, add.legend = TRUE, old = FALSE,
  regnames = NULL, maplim = c(-51, -8), ...)

allAustraliaKey(fun, ...)

Arguments

fun

function to be executed at the respective spots for insets

bg

list containing information to colour the map background (see details)

add.legend

logical, should legend for map background be added?

old

logical, should old regions be used (RE,RW instead of RN,RS)?

regnames

which regions should be plotted (see details)

maplim

vertical extent of background map for control of additional whitespace

...

additional arguments passed to fun

Details

The list for background colouring has to contain at least the object data, a vector with values to use in colouring named with the region abbreviations. In addition, col and lev can be added to control the colouring. title will add a title and units will add units to the legend.

Examples

1
2
3
4
5
6
7
bbg <- list(data=c(R=0.9, SA=1.9, `NA`=2.9, EA=3.9))
afun <- function(regn) {
     plot(rnorm(100), type='l', xlab='', ylab='', axes=FALSE)
     box()
     text(1, par('usr')[4], regn, font=2, adj=c(0,1.5))
     }
allAustralia(fun=afun, bg=bbg, regnames=c('R', 'NA', 'SA', 'EA'))

jonasbhend/NRMgraphics documentation built on May 19, 2019, 7:26 p.m.