Skip to contents

Create a stacked bar chart

Usage

ggstacked(
  data,
  y = key,
  npos = 1.1,
  min_pc = 0.05,
  pattern = NULL,
  n_breaks = 2,
  text_size = 3
)

Arguments

data

data to plot

y

value for the y-axis

npos

position of sidebar text

min_pc

minimum percent to display text of

pattern

regex pattern to use with grepl for turning text white/black

n_breaks

number of break points

text_size

text size

Value

ggplot object