Description Usage Arguments Value Author(s) See Also Examples
prettyBars creates simple, crisp, publication-style quality bar graphs.
1 2 3 |
data |
A set of data you would like to plot with bars for 1 dimension. Can be original data or factor scores or anything with at least 1 column. |
axis |
which axis (column of |
cex.names |
size of the text |
fg.col |
a matrix (single column) of colors for bars corresponding to rows of |
axis.lims |
two values in the form of |
show.bg.bars |
a set of bars to be plotted under the bars in |
threshold.line |
boolean. If TRUE, a line perpendicular to the bars is plotted. The lines appear at |
main |
A title to be placed at the top of the graph. |
bg.border |
color for |
bg.col |
a matrix (single column) of colors for background bars to be plotted under |
bg.lims |
two values in the form of |
sort.data |
a boolean. Will sort the bars by descending values. |
horiz |
see |
dev.new |
boolean. If TRUE, |
bp.cols |
locations of bars (as would be returned by |
Derek Beaton
1 2 3 4 5 6 | ##stolen from ?barplot
#tN <- table(Ni <- stats::rpois(100, lambda = 5))
#the.colors <- rainbow(length(tN))
#dev.new()
#r <- barplot(tN, col = the.colors)
#prettyBars(as.matrix(tN),axis=1,fg.col=as.matrix(the.colors),horiz=FALSE,dev.new=TRUE)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.