BarView: Bar plot

View source: R/BarView.R

BarViewR Documentation

Bar plot

Description

Bar plot

Usage

BarView(
  df,
  x = "x",
  y = "y",
  fill = "#FC6665",
  bar.width = 0.8,
  position = "dodge",
  dodge.width = 0.8,
  main = NA,
  xlab = NULL,
  ylab = NA,
  ...
)

Arguments

df

A data frame.

x

A character, specifying the x-axis.

y

A character, specifying the y-axis.

fill

A character, specifying the fill color.

bar.width

A numeric, specifying the width of bar.

position

"dodge" (default), "stack", "fill".

dodge.width

A numeric, set the width in position_dodge.

main

A charater, specifying the figure title.

xlab

A character, specifying the title of x-axis.

ylab

A character, specifying the title of y-axis.

...

Other parameters in geom_bar

Value

An object created by ggplot, which can be assigned and further customized.

Author(s)

Wubing Zhang

Examples

mdata = data.frame(group=letters[1:5], count=sample(1:100,5))
BarView(mdata, x = "group", y = "count")

WubingZhang/MAGeCKFlute documentation built on Jan. 27, 2024, 2:43 p.m.