Add hbar_percent()
This commit is contained in:
parent
c8fdf41521
commit
d349e6a6d3
10 changed files with 319 additions and 14 deletions
|
|
@ -16,7 +16,6 @@ hbar(
|
|||
y_title = "",
|
||||
group_title = NULL,
|
||||
font_family = "Leelawadee",
|
||||
scales_percent = TRUE,
|
||||
position = "dodge",
|
||||
reverse = FALSE,
|
||||
title = "",
|
||||
|
|
@ -47,8 +46,6 @@ hbar(
|
|||
|
||||
\item{font_family}{The font family. Default to "Leelawadee"}
|
||||
|
||||
\item{scales_percent}{Should x_labels be scaled to percentages? Default to TRUE.}
|
||||
|
||||
\item{position}{Should the chart be stacked? Default to dodge}
|
||||
|
||||
\item{reverse}{Boolean indicating whether the color palette should be reversed}
|
||||
|
|
|
|||
64
man/hbar_percent.Rd
Normal file
64
man/hbar_percent.Rd
Normal file
|
|
@ -0,0 +1,64 @@
|
|||
% Generated by roxygen2: do not edit by hand
|
||||
% Please edit documentation in R/hbar.R
|
||||
\name{hbar_percent}
|
||||
\alias{hbar_percent}
|
||||
\title{Simple horizontal bar chart which scales x_labels to percentages}
|
||||
\usage{
|
||||
hbar_percent(
|
||||
.tbl,
|
||||
x,
|
||||
y,
|
||||
group = NULL,
|
||||
initiative = "reach",
|
||||
pal = "primary",
|
||||
width = 0.5,
|
||||
x_title = "",
|
||||
y_title = "",
|
||||
group_title = NULL,
|
||||
font_family = "Leelawadee",
|
||||
position = "dodge",
|
||||
reverse = FALSE,
|
||||
title = "",
|
||||
subtitle = "",
|
||||
...
|
||||
)
|
||||
}
|
||||
\arguments{
|
||||
\item{.tbl}{Some data}
|
||||
|
||||
\item{x}{Some numeric column on the x scale}
|
||||
|
||||
\item{y}{Some column on the y scale}
|
||||
|
||||
\item{group}{Some grouping categorical column, e.g. administrative areas}
|
||||
|
||||
\item{initiative}{Either "reach" or "agora" or "impact" for the color palette}
|
||||
|
||||
\item{pal}{The color palette from the initiative}
|
||||
|
||||
\item{width}{Width.}
|
||||
|
||||
\item{x_title}{The x scale title. Default to empty string}
|
||||
|
||||
\item{y_title}{The y scale title. Default to empty string}
|
||||
|
||||
\item{group_title}{The group legend title. Defaut to NULL}
|
||||
|
||||
\item{font_family}{The font family. Default to "Leelawadee"}
|
||||
|
||||
\item{position}{Should the chart be stacked? Default to dodge}
|
||||
|
||||
\item{reverse}{Boolean indicating whether the color palette should be reversed}
|
||||
|
||||
\item{title}{Plot title. Default to empty string}
|
||||
|
||||
\item{subtitle}{Plot subtitle. Default to empty string}
|
||||
|
||||
\item{...}{Other arguments to be passed to "ggblanket::gg_col"}
|
||||
}
|
||||
\value{
|
||||
A horizontal bar chart
|
||||
}
|
||||
\description{
|
||||
Simple horizontal bar chart which scales x_labels to percentages
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue