Update to v0.4.9000
67
man/bar.Rd
Normal file
|
|
@ -0,0 +1,67 @@
|
|||
% Generated by roxygen2: do not edit by hand
|
||||
% Please edit documentation in R/bar.R
|
||||
\name{bar}
|
||||
\alias{bar}
|
||||
\title{Simple bar chart}
|
||||
\usage{
|
||||
bar(
|
||||
df,
|
||||
x,
|
||||
y,
|
||||
group = NULL,
|
||||
flip = TRUE,
|
||||
percent = TRUE,
|
||||
position = "dodge",
|
||||
alpha = 1,
|
||||
x_title = NULL,
|
||||
y_title = NULL,
|
||||
group_title = NULL,
|
||||
title = NULL,
|
||||
subtitle = NULL,
|
||||
caption = NULL,
|
||||
add_text = FALSE,
|
||||
add_text_suffix = "",
|
||||
theme = theme_reach()
|
||||
)
|
||||
}
|
||||
\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{flip}{TRUE or FALSE. Default to TRUE or horizontal bar plot.}
|
||||
|
||||
\item{percent}{TRUE or FALSE. Should the x-labels (and text labels if present) be displayed as percentages? Default to TRUE.}
|
||||
|
||||
\item{position}{Should the chart be stacked? Default to "dodge". Can take "dodge" and "stack".}
|
||||
|
||||
\item{alpha}{Fill transparency.}
|
||||
|
||||
\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{title}{Plot title. Default to NULL.}
|
||||
|
||||
\item{subtitle}{Plot subtitle. Default to NULL.}
|
||||
|
||||
\item{caption}{Plot caption. Default to NULL.}
|
||||
|
||||
\item{add_text}{TRUE or FALSE. Add the value as text.}
|
||||
|
||||
\item{add_text_suffix}{If percent is FALSE, should we add a suffix to the text label?}
|
||||
|
||||
\item{theme}{Whatever theme. Default to theme_reach().}
|
||||
}
|
||||
\value{
|
||||
A bar chart
|
||||
}
|
||||
\description{
|
||||
Simple bar chart
|
||||
}
|
||||
|
|
@ -1,82 +0,0 @@
|
|||
% 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,
|
||||
...
|
||||
)
|
||||
}
|
||||
\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{...}{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.
|
||||
}
|
||||
|
Before Width: | Height: | Size: 5.6 KiB After Width: | Height: | Size: 31 KiB |
|
Before Width: | Height: | Size: 5.5 KiB After Width: | Height: | Size: 26 KiB |
BIN
man/figures/README-example-bar-chart-3.png
Normal file
|
After Width: | Height: | Size: 26 KiB |
|
Before Width: | Height: | Size: 5.4 KiB After Width: | Height: | Size: 116 KiB |
|
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 303 KiB |
|
Before Width: | Height: | Size: 6.2 KiB After Width: | Height: | Size: 145 KiB |
58
man/point.Rd
Normal file
|
|
@ -0,0 +1,58 @@
|
|||
% Generated by roxygen2: do not edit by hand
|
||||
% Please edit documentation in R/point.R
|
||||
\name{point}
|
||||
\alias{point}
|
||||
\title{Simple bar chart}
|
||||
\usage{
|
||||
point(
|
||||
df,
|
||||
x,
|
||||
y,
|
||||
group = NULL,
|
||||
flip = TRUE,
|
||||
alpha = 1,
|
||||
size = 1,
|
||||
x_title = NULL,
|
||||
y_title = NULL,
|
||||
group_title = NULL,
|
||||
title = NULL,
|
||||
subtitle = NULL,
|
||||
caption = NULL,
|
||||
theme = theme_reach()
|
||||
)
|
||||
}
|
||||
\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{flip}{TRUE or FALSE. Default to TRUE or horizontal bar plot.}
|
||||
|
||||
\item{alpha}{Fill transparency.}
|
||||
|
||||
\item{size}{Point size.}
|
||||
|
||||
\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{title}{Plot title. Default to NULL.}
|
||||
|
||||
\item{subtitle}{Plot subtitle. Default to NULL.}
|
||||
|
||||
\item{caption}{Plot caption. Default to NULL.}
|
||||
|
||||
\item{theme}{Whatever theme. Default to theme_reach().}
|
||||
}
|
||||
\value{
|
||||
A bar chart
|
||||
}
|
||||
\description{
|
||||
Simple bar chart
|
||||
}
|
||||
|
|
@ -1,73 +0,0 @@
|
|||
% Generated by roxygen2: do not edit by hand
|
||||
% Please edit documentation in R/point.R
|
||||
\name{point_reach}
|
||||
\alias{point_reach}
|
||||
\title{Simple point chart}
|
||||
\usage{
|
||||
point_reach(
|
||||
df,
|
||||
x,
|
||||
y,
|
||||
group = NULL,
|
||||
palette = "main",
|
||||
reverse = FALSE,
|
||||
family = "Leelawadee",
|
||||
alpha = 1,
|
||||
size = 1.5,
|
||||
x_title = NULL,
|
||||
y_title = NULL,
|
||||
group_title = NULL,
|
||||
title = NULL,
|
||||
subtitle = NULL,
|
||||
caption = NULL,
|
||||
text_size = 10,
|
||||
title_size = 14,
|
||||
legend_position = "right",
|
||||
...
|
||||
)
|
||||
}
|
||||
\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{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{size}{Dot size. Default to 1.5.}
|
||||
|
||||
\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{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{...}{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.
|
||||
}
|
||||
|
|
@ -8,14 +8,24 @@ theme_reach(
|
|||
palette = "main",
|
||||
discrete = TRUE,
|
||||
reverse = FALSE,
|
||||
family = "Leelawadee",
|
||||
font_family = "Leelawadee",
|
||||
title_size = 12,
|
||||
title_color = cols_reach("main_grey"),
|
||||
title_font_face = "bold",
|
||||
text_size = 10,
|
||||
title_size = 14,
|
||||
plot_background_pal = "#FFFFFF",
|
||||
panel_background_pal = "#FFFFFF",
|
||||
text_color = cols_reach("main_grey"),
|
||||
text_font_face = "bold",
|
||||
panel_background_color = "#FFFFFF",
|
||||
legend_position = "right",
|
||||
legend_direction = "vertical",
|
||||
legend_reverse = TRUE,
|
||||
axis_x = TRUE,
|
||||
axis_y = TRUE,
|
||||
grid_x = FALSE,
|
||||
grid_y = FALSE,
|
||||
grid_color = cols_reach("main_lt_grey"),
|
||||
grid_x_size = 0.1,
|
||||
grid_y_size = 0.1,
|
||||
...
|
||||
)
|
||||
}
|
||||
|
|
@ -26,15 +36,21 @@ theme_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{font_family}{The font family for all plot's texts. Default to "Leelawadee".}
|
||||
|
||||
\item{title_size}{The size of the title. Defaults to 12.}
|
||||
|
||||
\item{title_color}{Title color.}
|
||||
|
||||
\item{title_font_face}{Title font face. Default to "bold". Font face ("plain", "italic", "bold", "bold.italic").}
|
||||
|
||||
\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_family. Defaults to 14.}
|
||||
\item{text_color}{Text color.}
|
||||
|
||||
\item{plot_background_pal}{The color for the plot background color. Default to white.}
|
||||
\item{text_font_face}{Text font face. Default to "bold". Font face ("plain", "italic", "bold", "bold.italic").}
|
||||
|
||||
\item{panel_background_pal}{The color for the panel background color. Default to white.}
|
||||
\item{panel_background_color}{The color for the panel background color. Default to white.}
|
||||
|
||||
\item{legend_position}{Position of the legend; Default to "right". Can take "right", "left", "top", "bottom" or "none".}
|
||||
|
||||
|
|
@ -42,7 +58,21 @@ theme_reach(
|
|||
|
||||
\item{legend_reverse}{Reverse the color in the guide? Default to TRUE.}
|
||||
|
||||
\item{...}{Additional arguments passed to `ggblanket::gg_theme()`.}
|
||||
\item{axis_x}{Boolean. Do you need x-axis?}
|
||||
|
||||
\item{axis_y}{Boolean. Do you need y-axis?}
|
||||
|
||||
\item{grid_x}{Boolean. Do you need major grid lines for x-axis?}
|
||||
|
||||
\item{grid_y}{Boolean. Do you need major grid lines for y-axis?}
|
||||
|
||||
\item{grid_color}{Grid lines color.}
|
||||
|
||||
\item{grid_x_size}{X line size.}
|
||||
|
||||
\item{grid_y_size}{Y line size.}
|
||||
|
||||
\item{...}{Additional arguments passed to `ggplot2::gg_theme()`.}
|
||||
}
|
||||
\value{
|
||||
The base REACH theme
|
||||
|
|
|
|||