Rev 5241 | Blame | Compare with Previous | Last modification | View Log | Download | RSS feed
\name{C_03_simpleTheme}\alias{simpleTheme}\title{ Function to generate a simple theme }\description{Simple interface to generate a list appropriate as a theme, typicallyused as the \code{par.settings} argument in a high level call}\usage{simpleTheme(col, alpha,cex, pch, lty, lwd, font, fill, border,col.points, col.line,alpha.points, alpha.line)}\arguments{\item{col, col.points, col.line}{A color specification. \code{col} is used for components\code{plot.symbol}, \code{plot.line}, \code{plot.polygon},\code{superpose.symbol}, \code{superpose.line}, and\code{superpose.polygon}. \code{col.points} overrides \code{col},and is used only for \code{plot.symbol} and\code{superpose.symbol}. Similarly, \code{col.lines} overrides\code{col} for \code{plot.line} and \code{superpose.line}. Thearguments can be vectors, but only the first component is used forscalar targets (i.e., the ones without \code{"superpose"} in theirname).}\item{alpha, alpha.points, alpha.line}{A numeric alpha transparency specification. The same rules as\code{col}, etc., apply.}\item{cex, pch, font}{ Parameters for points. Applicable forcomponents \code{plot.symbol} (for which only the first component isused) and \code{superpose.symbol} (for which the arguments can bevectors).}\item{lty, lwd}{ Parameters for lines. Applicable forcomponents \code{plot.line} (for which only the first component isused) and \code{superpose.line} (for which the arguments can bevectors).}\item{fill}{ fill color, applicable for components \code{plot.symbol},\code{plot.polygon}, \code{superpose.symbol}, and\code{superpose.polygon}. }\item{border}{ border color, applicable for components\code{plot.polygon} and \code{superpose.polygon}. }}\details{The appearance of a lattice display depends partly on the\dQuote{theme} active when the display is plotted (see\code{\link{trellis.device}} for details). This theme is used toobtain defaults for various graphical parameters, and in particular,the \code{auto.key} argument works on the premise that the same sourceis used for both the actual graphical encoding and the legend. Theeasiest way to specify custom settings for a particular display is touse the \code{par.settings} argument, which is usually tedious toconstruct as it is a nested list. The \code{simpleTheme} function canbe used in such situations as a wrapper that generates a suitable listgiven parameters in simple \code{name=value} form, with the nestingmade implicit. This is less flexible, but straightforward andsufficient in most situations.}\value{A list that would work as the \code{theme} argument to\code{\link{trellis.device}} and \code{\link{trellis.par.set}}, oras the \code{par.settings} argument to any high level lattice functionsuch as \code{\link{xyplot}}.}\examples{str(simpleTheme(pch = 16))dotplot(variety ~ yield | site, data = barley, groups = year,auto.key = list(space = "right"),par.settings = simpleTheme(pch = 16),xlab = "Barley Yield (bushels/acre) ",aspect=0.5, layout = c(1,6))}\author{Deepayan Sarkar \email{Deepayan.Sarkar@R-project.org}, based on asuggestion from John Maindonald.}\seealso{\code{\link{trellis.device}}, \code{\link{xyplot}},\code{\link{Lattice}}}\keyword{dplot}