View source: R/plot_distribution.R
plot_boxplot | R Documentation |
Boxplots and density plots provide complementary views of data distributions. The general idea is that if the box for one sample is significantly shifted from the others, then it is likely an outlier in the same way a density plot shifted is an outlier.
plot_boxplot(
data,
colors = NULL,
plot_title = NULL,
order = NULL,
violin = FALSE,
scale = NULL,
expt_names = NULL,
label_chars = 10,
...
)
data |
Expt or data frame set of samples. |
colors |
Color scheme, if not provided will make its own. |
plot_title |
A title! |
order |
Set the order of boxen. |
violin |
Print this as a violin rather than a just box/whiskers? |
scale |
Whether to log scale the y-axis. |
expt_names |
Another version of the sample names for printing. |
label_chars |
Maximum number of characters for abbreviating sample names. |
... |
More parameters are more fun! |
Ggplot2 boxplot of the samples. Each boxplot contains the following information: a centered line describing the median value of counts of all genes in the sample, a box around the line describing the inner-quartiles around the median (quartiles 2 and 3 for those who are counting), a vertical line above/below the box which shows 1.5x the inner quartile range (a common metric of the non-outliers), and single dots for each gene which is outside that range. A single dot is transparent.
[ggplot2]
## Not run:
a_boxplot <- plot_boxplot(expt)
a_boxplot ## ooo pretty boxplot look at the lines
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.