Learn R Programming

lmSupport (version 2.9.13)

figBarPlot: Wrapper for standarized use of barplot2() from gplots

Description

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

Usage

figBarPlot(Means, ylim=NULL, lab.text=NULL, main.text=NULL, se=NULL, 
                  bars.col= NULL, bars.density=NULL, bars.angle=NULL, bars.space=NULL,
                  scale.cex=NULL, lab.cex=NULL, lab.font=NULL, 
                  ci.plot=NULL, ci.col=NULL, ci.lty=NULL, ci.lwd = NULL, ci.width = NULL)

Arguments

Means

matrix of means to plot.

ylim

vector of min and max for y axis

lab.text

label for x-axis

main.text

main label for plot. See barplot2

se

standard error of mean for CI plotting, if needed

bars.col,bars.density, bars.angle, bars.space

color, density, angle, and space for bars. see barplot2 for additional detail

scale.cex

cex for x axis scale

lab.font, lab.cex

cex and font for x axis label

ci.plot

boolean to indicate if CIs should be plotted

ci.col,ci.lty,ci.lwd,ci.width

col, lty, lwd, and width of CI lines

Value

None

See Also

barplot2(), figLabDefaults(), figSetDefaults(), figNewDevice(), figLines(),figLines()

Examples

Run this code
# NOT RUN {
##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('topright', legend=colnames(Means),fill=bars.col, angle=bars.angle,
## density=bars.density)

# }

Run the code above in your browser using DataLab