ggboxplot: Fancy boxplot via ggplot2

Description Usage Arguments Examples

View source: R/ggboxplot.R

Description

Fancy boxplot via ggplot2.

Usage

1
ggboxplot(data, ylab="y-label", color_brewer_name="Set2", horizontal=FALSE, ...)

Arguments

data

See example for data format.

...

Additional params passed geom_boxplot.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
## source('../data/ggboxplot_data.RData')
data('ggboxplot_data')
#library(reshape2) # if required load it
## use with reshape2::melt to reshape data
ggplot(aes(y = Value, x = Gene, fill = Group), data = data) + geom_boxplot(outlier.shape = NA) + ylab("ylab") + coord_flip() + scale_color_brewer("Set2")

colnames(data) = c('G1','G2','Value')
ggboxplot(data)

ggboxplot(data,horizontal=TRUE,size=0.1,outlier.shape=NA)

lixiangchun/lxctk documentation built on May 21, 2019, 6:44 a.m.