visualizeR/man/waffle.Rd
2023-05-29 11:13:34 +02:00

53 lines
1.2 KiB
R

% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/waffle.R
\name{waffle}
\alias{waffle}
\title{Simple waffle chart}
\usage{
waffle(
df,
x,
y,
n_rows = 10,
size = 2,
x_title = NULL,
x_lab = NULL,
title = NULL,
subtitle = NULL,
caption = NULL,
arrange = TRUE,
theme = theme_reach(axis_x = FALSE, axis_y = FALSE, legend_position = "bottom",
legend_direction = "horizontal", title_hjust = 0.5)
)
}
\arguments{
\item{df}{A data frame.}
\item{x}{A character column or coercible as a character column. Will give the waffle's fill color.}
\item{y}{A numeric column (if plotting proportion, make sure to have percentages between 0 and 100 and not 0 and 1).}
\item{n_rows}{Number of rows. Default to 10.}
\item{size}{Width of the separator between blocks (defaults to 2).}
\item{x_title}{The x scale title. Default to NULL.}
\item{x_lab}{The x scale caption. Default to NULL.}
\item{title}{Plot title. Default to NULL.}
\item{subtitle}{Plot subtitle. Default to NULL.}
\item{caption}{Plot caption. Default to NULL.}
\item{arrange}{TRUE or FALSE. Arrange by highest percentage first.}
\item{theme}{Whatever theme. Default to theme_reach().}
}
\value{
A waffle chart
}
\description{
Simple waffle chart
}