View source: R/horisontal_bar_plot.R
horisontal_bar_plot | R Documentation |
Plot a bar plot using ggplot2.
horisontal_bar_plot( df, x_var, fill_var, title = NULL, subtitle = NULL, y_lab = NULL, x_lab = NULL, fill_colors = NULL, percent_accuracy = 1, ... )
df |
Data frame. |
x_var |
Variable for x axis, use string name.
Recommended that |
fill_var |
Variable for the different colors in bars,
use string name.
Use |
title |
Plot title, |
subtitle |
Small text under title, |
y_lab |
Y-axis label, use |
x_lab |
X-axis label, use |
fill_colors |
Color of the different categories in |
percent_accuracy |
Set accuracy for |
... |
arguments passed to |
ggplot object containing bar plot.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.