Simple horizontal bar chart
Usage
hbar(
.tbl,
x,
y,
group = NULL,
initiative = "reach",
pal = "primary",
width = 0.5,
x_title = "",
y_title = "",
group_title = NULL,
font_family = "Leelawadee",
font_size = 12,
position = "dodge",
reverse = FALSE,
title = "",
subtitle = "",
title_font_size = 16,
subtitle_font_size = 14,
...
)Arguments
- .tbl
Some data
- x
Some numeric column on the x scale
- y
Some column on the y scale
- group
Some grouping categorical column, e.g. administrative areas
- initiative
Either "reach" or "agora" or "impact" for the color palette
- pal
The color palette from the initiative
- width
Width
- x_title
The x scale title. Default to empty string
- y_title
The y scale title. Default to empty string
- group_title
The group legend title. Defaut to NULL
- font_family
The font family. Default to "Leelawadee"
- font_size
Body font size; default to 12
- position
Should the chart be stacked? Default to dodge
- reverse
Boolean indicating whether the color palette should be reversed
- title
Plot title. Default to empty string
- subtitle
Plot subtitle. Default to empty string
- title_font_size
Default to 16
- subtitle_font_size
Default to 14
- ...
Other arguments to be passed to "ggblanket::gg_col"
