figLegend: Wrapper for standarized use of figLegend()

Description Usage Arguments Value Author(s) See Also Examples

Description

Wrapper function for standardized use of Legend() with lab defaults for display

Usage

1
2
3
figLegend(x, y=NULL, legend, fill=NULL, border='black', 
angle=NULL, density=NULL, pch=NULL, leg.cex=NULL, leg.lty,
leg.lwd=NULL, leg.font=NULL, leg.bty=NULL)

Arguments

x,y

the x and y co-ordinates to be used to position the legend. They can be specified by keyword or in any way which is accepted by xy.coords: See 'Details' in legend()

legend

a character or expression vector of length = 1 to appear in the legend. Other objects will be coerced by as.graphicsAnnot.

fill

if specified, this argument will cause boxes filled with the specified colors (or shaded in the specified colors) to appear beside the legend text.

border

border of box surrounding legend points. see fill

angle

angle of shading lines.

density

the density of shading lines, if numeric and positive. If NULL or negative or NA color filling is assumed.

pch

the plotting symbols appearing in the legend, as numeric vector or a vector of 1-character strings (see points). Unlike points, this can all be specified as a single multi-character string. Must be specified for symbol drawing.

leg.cex,leg.lty,leg.lwd,leg.font,leg.bty

cex,lty, lwd, font, and bty for legend. Defaults to values in options if NULL. Set leg.lty & leg.lwd to NA if you want bars rather than lines in legend

Value

None

Author(s)

John J. Curtin jjcurtin@wisc.edu

See Also

legend(), figLabDefaults(), figSetDefaults(), figNewDevice(), figLines(),figLines()

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
##not run
##Means = matrix(c(70,65,68,91,100,90), nrow=2,ncol=3, byrow=TRUE)
##colnames(Means) = c('ITI', 'CUE-', 'CUE+')
##rownames(Means) = c('Non-deprived', 'Deprived')
##se = matrix(c(5,10,4,5,10,4), nrow=2,ncol=3, byrow=TRUE)

##bars.col = c('gray', 'white', 'black')
##bars.density = c(-1,-1,10)  #negative density suppresses lines
##bars.angle = c(0,0,45)

##figNewDevice()
##figBarPlot(Means,ylim=c(0,130), lab.text='Group', ci.plot=TRUE, se=se,
##           bars.col=bars.col,bars.density=bars.density, bars.angle = bars.angle)
##figAxis(side=2,lab.text='Startle Response', scale.at=seq(0,120,by=20))
##figLegend(x='topright', legend=colnames(Means),fill=bars.col, 
##          angle=bars.angle, density=bars.density)

lmSupport documentation built on May 2, 2019, 2:14 p.m.