DAAGtheme {DAAG}R Documentation

Function to generate lattice themes for graphs.

Description

This generates themes for use in a planned 4th edition of "Data Analysis and Graphics Using R".

Usage

DAAGtheme(fontsize = list(text = 10, points = 6), box = "gray40",
          sides = list(tck = 0.6, pad1 = 0.75, pad2 = 0.75),...)

Arguments

fontsize

Fontize for text and points. Specify as, e.g., list(text = 10, points = 6).

box

Color for the panel and strip borders.

sides

List, with elements tck (Tick length, as fraction of lattice default), and margin paddings pad1, pad2, pad3, and pad4. Margin paddings set the distance, in lines, from the tick marks to the tick labels.

...

Settings that will be passed to simpleTheme().

Details

Setting the color of the bounding box and of the strip boxes set gray, which is the default, reduces the focus on them.

Value

A list which can be used as the par.settings argument to lattice graphics functions, or as the theme argument to trellis.par.set().

Note

The code provides an example of the creation of a functions that generates themes that are tuned to specific user requirements. In this connection, see also theEconomist.theme.

Author(s)

John Maindonald.

See Also

standard.theme, simpleTheme, theEconomist.theme, custom.theme

Examples

bwtheme <- DAAGtheme(pch=2:4)
lattice::xyplot(csoa ~ age | target, groups=sex, 
                data=DAAG::tinting, par.settings=bwtheme)

[Package DAAG version 1.25.4 Index]