plot_freqs: Plot frequency graph

Description Usage Arguments Value

View source: R/plot.R

Description

Produce bar chart (plotly) for single factor frequency data.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
plot_freqs(
  table,
  xlab,
  ylab,
  bar_colour,
  n,
  font_size = 12,
  orientation = "v",
  break_q_names_col = NULL,
  max_lines = 2,
  ...
)

Arguments

table

Frequency table (data frame). 2 columns - cateogry names and frequencies.

xlab

X axis title

ylab

Y axis title

bar_colour

Colour name. Defaults to blue (see get_gradient())

n

sample size

font_size

minimum font size for the plot (numeric).

orientation

plot orientation ("h" = horizontal, "v" = verical). Vertical by default

break_q_names_col

applies break_q_names to the column. Not applied by default

max_lines

maximum number of lines. Int, defaults to 2/ See carsurvey::break_q_names()

...

additional plotly_ly arguments

Value

bar chart


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