Learn R Programming

DAAG (version 1.25.6)

DAAGtheme: Function to generate lattice themes for graphs.

Description

This generates themes for use in "A Practical Guide to Data Analysis Using R".

Usage

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

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().

Arguments

fontsize

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

box

Color for the panel and strip borders

color

Logical, determining whether graph will be colored or grayscale

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().

Author

John Maindonald.

Details

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

See Also

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

Examples

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

Run the code above in your browser using DataLab