plot_stacked: Plot stacked bar graph

Description Usage Arguments Value

View source: R/plot.R

Description

Produce stacked bar chart (plotly).

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
plot_stacked(
  table,
  xlab,
  ylab,
  n,
  colour_scale = "2gradients",
  font_size = 12,
  neutral_mid = TRUE,
  ...
)

Arguments

table

Frequency table for stacked bar chart (data frame). 3+ columns - sub-question names in column 1 with answer options in subsequent columns..

xlab

X axis title

ylab

Y axis title

n

sample size

colour_scale

type of colour scale ("gradient", "scale" or "2gradients"). See get_gradient(), get_2colour_scale() and get_2colour_gradients().

font_size

minimum font size for the plot (numeric).

neutral_mid

whether the midpoint of the colour scale should be neutral ("2gradients" scale only). TRUE by default

...

additional plotly_ly arguments

Value

bar chart


best-practice-and-impact/CARS2 documentation built on Dec. 19, 2021, 8:47 a.m.