man/anno_barplot.rd
d1da987e
 \name{anno_barplot}
 \alias{anno_barplot}
 \title{
6f1307c6
 Using barplot as annotation
d1da987e
 }
 \description{
6f1307c6
 Using barplot as annotation
d1da987e
 }
 \usage{
5ab2cb81
 anno_barplot(x, baseline = "min", which = c("column", "row"), border = TRUE, bar_width = 0.6,
dc0ec14d
     gp = gpar(fill = "#CCCCCC"), ylim = NULL, axis = FALSE, axis_side = NULL,
ba8a5070
     axis_gp = gpar(fontsize = 8), axis_direction = c("normal", "reverse"), ...)
 }
d1da987e
 \arguments{
 
02998f61
   \item{x}{a vector of numeric values. If the value is a matrix, columns of the matrix will be represented as stacked barplots. Note for stacked barplots, each row in the matrix should only contain values with same sign (either all positive or all negative).}
   \item{baseline}{baseline for bars. The value should be "min" or "max", or a numeric value. It is enforced to be zero for stacked barplots.}
d1da987e
   \item{which}{is the annotation a column annotation or a row annotation?}
aee203e0
   \item{border}{whether show border of the annotation compoment}
   \item{bar_width}{relative width of the bars, should less than one}
02998f61
   \item{gp}{graphic parameters. If it is the stacked barplots, the length of the graphic parameter should  be same as the number of stacks.}
dc0ec14d
   \item{ylim}{data ranges.}
11a77c85
   \item{axis}{whether add axis}
bbf90151
   \item{axis_side}{if it is placed as column annotation, value can only be "left" or "right". If it is placed as row annotation, value can only be "bottom" or "top".}
11a77c85
   \item{axis_gp}{graphic parameters for axis}
5ab2cb81
   \item{axis_direction}{if the annotation is row annotation, should the axis be from left to right (default) or follow the reversed direction?}
d1da987e
   \item{...}{for future use.}
ba8a5070
 
d1da987e
 }
 \value{
6f1307c6
 A graphic function which can be set in \code{\link{HeatmapAnnotation}} constructor method.
d1da987e
 }
 \author{
6f1307c6
 Zuguang Gu <z.gu@dkfz.de>
d1da987e
 }
 \examples{
 f = anno_barplot(rnorm(10))
 grid.newpage(); f(1:10)
 
 f = anno_barplot(rnorm(10), which = "row")
f597719b
 grid.newpage(); f(1:10)
ba8a5070
 
f597719b
 }