one-bar annotation ggplot

vannomap(
  X,
  y.name = NULL,
  x.name = NULL,
  angle = F,
  num = T,
  flip = F,
  hide.legend = T,
  get.legend = F,
  legend.pos = "top",
  ratio = 33,
  tile.col = "black",
  tile.size = 0.01,
  mar = 0.015,
  cols = NULL,
  limits = NULL,
  nrow = 1,
  patchwork = T,
  heights = c(9, 1),
  guides = "collect",
  ...
)

Arguments

X

named character vector of observations and groups (names); or a dataframe with first two columns as observations and groups.

angle

logical indicating whether to angle title if flip = T. Default: T

num

enumerate observations on x axis? Default: T

flip

observations along y axis instead of x? Default: F

hide.legend

logical. Default: T

legend.pos

character string. See legend.position in ggplot2::theme for details. Default: 'top'

ratio

aspect ratio. If flip = T, ratio = 1/ratio.. Default: 0.03

mar

see plot.margin in ggplot2::themes for details. Default: 0.015

cols

custom colour palette. Option to name colours by groups to choose individual group colours. Default: NULL

title

vannomap title. Default: NULL

x.title

x axis (observations) title (e.g. 'cells'). Default: NULL

pal

numeric value specifying different qualitative brewer palettes. See ggplot2::scale_fill_brewer for details. Default: 1

breaks

set to NULL to remove x axis tick marks. Default: ggplot2::waiver()

cols.order

character vector with groups. Changing the order changes the assignment of colours to groups. Default: names(cols)

Value

ggplot