85 lines
2.1 KiB
R
85 lines
2.1 KiB
R
% Generated by roxygen2: do not edit by hand
|
|
% Please edit documentation in R/bar.R
|
|
\name{bar_reach}
|
|
\alias{bar_reach}
|
|
\title{Simple bar chart}
|
|
\usage{
|
|
bar_reach(
|
|
df,
|
|
x,
|
|
y,
|
|
group = NULL,
|
|
percent = TRUE,
|
|
palette = "main",
|
|
reverse = FALSE,
|
|
family = "Leelawadee",
|
|
alpha = 1,
|
|
width = 0.5,
|
|
x_title = NULL,
|
|
y_title = NULL,
|
|
group_title = NULL,
|
|
position = "dodge",
|
|
title = NULL,
|
|
subtitle = NULL,
|
|
caption = NULL,
|
|
text_size = 10,
|
|
title_size = 14,
|
|
legend_position = "right",
|
|
legend_rev = TRUE,
|
|
void = FALSE,
|
|
...
|
|
)
|
|
}
|
|
\arguments{
|
|
\item{df}{A data frame.}
|
|
|
|
\item{x}{A numeric column.}
|
|
|
|
\item{y}{A character column or coercible as a character column.}
|
|
|
|
\item{group}{Some grouping categorical column, e.g. administrative areas or population groups.}
|
|
|
|
\item{percent}{TRUE or FALSE. Should the x-labels be displayed as percentages? Default to TRUE.}
|
|
|
|
\item{palette}{Palette name from 'pal_reach()'.}
|
|
|
|
\item{reverse}{Boolean indicating whether the palette should be reversed.}
|
|
|
|
\item{family}{The font family for all plot's texts. Default to "Leelawadee".}
|
|
|
|
\item{alpha}{Transparency.}
|
|
|
|
\item{width}{Width.}
|
|
|
|
\item{x_title}{The x scale title. Default to NULL.}
|
|
|
|
\item{y_title}{The y scale title. Default to NULL.}
|
|
|
|
\item{group_title}{The group legend title. Default to NULL.}
|
|
|
|
\item{position}{Should the chart be stacked? Default to "dodge". Can take "dodge" and "stack".}
|
|
|
|
\item{title}{Plot title. Default to NULL.}
|
|
|
|
\item{subtitle}{Plot subtitle. Default to NULL.}
|
|
|
|
\item{caption}{Caption title string. Default to NULL.}
|
|
|
|
\item{text_size}{The size of all text other than the title, subtitle and caption. Defaults to 10.}
|
|
|
|
\item{title_size}{The size of the title text. Defaults to 14.}
|
|
|
|
\item{legend_position}{Position of the legend; Default to "right". Can take "right", "left", "top", "bottom" or "none".}
|
|
|
|
\item{legend_rev}{Reverse the color in the guide? Default to TRUE.}
|
|
|
|
\item{void}{Boolean to remove all elements from the plot. Default to FALSE.}
|
|
|
|
\item{...}{Other arguments to be passed to "ggblanket::gg_col"}
|
|
}
|
|
\value{
|
|
A bar chart
|
|
}
|
|
\description{
|
|
`ggblanket` as internals for deciding whether the bar chart is horizontally readable.
|
|
}
|