|
- % Generated by roxygen2: do not edit by hand
- % Please edit documentation in R/analyze.R
- \name{bar_plot_fractions}
- \alias{bar_plot_fractions}
- \title{Bar chart visualizing fraction based data}
- \usage{
- bar_plot_fractions(
- tb,
- x_variable = NULL,
- y_variable = NULL,
- fill = NULL,
- title = NULL,
- xlab = "Fraction",
- ylab = "n",
- filllab = "Fraction",
- flipped = TRUE,
- position = "dodge",
- reorder = FALSE
- )
- }
- \arguments{
- \item{tb}{tibble}
-
- \item{x_variable}{column in tb, default is fraction}
-
- \item{y_variable}{column in tb, default is n}
-
- \item{fill}{column in tb, default is fraction}
-
- \item{title}{plot title}
-
- \item{xlab}{label for x axis, default is fraction}
-
- \item{ylab}{label for y axis, default is n}
-
- \item{filllab}{default is 'Fraction'}
-
- \item{flipped}{if TRUE draw bars horizontally, else vertically. Default is TRUE}
-
- \item{position}{default is 'dodge'}
-
- \item{reorder}{Either reorder fraction factor by variable value or reorder fraction factor by party seat order in parliament (default).
-
- plot data from tb in the following way: for each item in x_variable show the corresponding value in y_variable.
- Then color the plot depending on the fill value.
- Give the plot a title and a label for x-axis and y-axis,
- color the legend according to filllab and finally
- improve positioning details according to position}
- }
- \description{
- Can be configured to also visualize data not related to fractions.
- }
|