Description Usage Arguments Value Examples
multVarPlot provides a simple interface for plotting multiple columns in a data.frame across common X and Y axes.
1 2 3 4 |
data |
data.frame containing variables for plotting |
varList |
Vector of variable names to plot across the x-axis |
grouping |
Variable name to use for grouping data |
legendTitle |
Title for the legend, given a grouping variable |
legendLabels |
Labels for the legend, given a grouping variable |
xlab |
X-axis label |
xlabels |
X-axis value labels to match to the varList variable names |
ylab |
Y-axis label |
ylabels |
Y-axis value labels |
colourManual |
Manual colour pallet for grouping variable levels |
shapeManual |
Manual shape pallet for grouping variable levels |
title |
Main title for plot |
errorBars |
If TRUE, error bars will be added to the plot |
errorBarWidth |
If errorBars==TRUE, width of the error bars |
errorBarType |
If errorBars==TRUE, error bar type: 'sd', 'se', or 'ci' |
A ggplot2 object
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | #data(iris)
#l <- multVarPlot(data=iris,
# varList= c("Sepal.Length", "Sepal.Width",
# "Petal.Length", "Petal.Width"),
# grouping = "Species",
# colourManual = c("blue", "red", "black"),
# shapeManual = c(15, 16, 17),
# errorBars = T,
# errorBarType = "sd")
#l + theme(legend.position="bottom") +
# scale_x_discrete("Measurement Type",
# labels=c("Sepal.Length"="SL",
# "Sepal.Width"="SW",
# "Petal.Length"="PL",
# "Petal.Width"="PW"))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.