vb_plot: Plot the summary of a voting bloc analysis

View source: R/plot.R

vb_plotR Documentation

Plot the summary of a voting bloc analysis

Description

Plot the summary of a voting bloc analysis

Usage

vb_plot(
  data,
  x_col = get_bloc_var(data),
  y_col,
  ymin_col,
  ymax_col,
  discrete = length(unique(data[[x_col]])) < 20
)

Arguments

data

a vbsum data.frame, the result of [vb_summary].

x_col

string naming the column that defines voting blocs.

y_col

string naming the column of point estimates.

ymin_col

string naming the column to plot as the lower bound of the confidence interval.

ymax_col

string naming the column to plot as the upper bound of the confidence interval.

discrete

logical indicating whether voting blocs are defined along a discrete (not continuous) variable.

Value

a ggplot object


coletl/blocs documentation built on Oct. 24, 2023, 6:26 p.m.