Update to v0.6.9000

This commit is contained in:
gnoblet 2023-01-24 19:40:53 -05:00
parent 1207731340
commit aba8c79f82
39 changed files with 1101 additions and 61 deletions

64
man/alluvial.Rd Normal file
View file

@ -0,0 +1,64 @@
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/alluvial.R
\name{alluvial}
\alias{alluvial}
\title{Simple alluvial chart}
\usage{
alluvial(
df,
from,
to,
value,
group = NULL,
alpha = 0.5,
from_levels = NULL,
value_title = NULL,
group_title = NULL,
title = NULL,
subtitle = NULL,
caption = NULL,
rect_color = cols_reach("white"),
rect_border_color = cols_reach("main_grey"),
rect_text_color = cols_reach("main_grey"),
theme = theme_reach(axis_y = FALSE, legend_position = "none")
)
}
\arguments{
\item{df}{A data frame.}
\item{from}{A character column of upstream stratum.}
\item{to}{A character column of downstream stratum.}
\item{value}{A numeric column of values.}
\item{group}{The grouping column to fill the alluvium with.}
\item{alpha}{Fill transparency. Default to 0.5.}
\item{from_levels}{Order by given from levels?}
\item{value_title}{The value/y scale title. Default to NULL.}
\item{group_title}{The group 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{rect_color}{Stratum rectangles' fill color.}
\item{rect_border_color}{Stratum rectangles' border color.}
\item{rect_text_color}{Stratum rectangles' text color.}
\item{theme}{Whatever theme. Default to theme_reach().}
}
\value{
A donut chart to be used parsimoniously
}
\description{
Simple alluvial chart
}

61
man/donut.Rd Normal file
View file

@ -0,0 +1,61 @@
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/donut.R
\name{donut}
\alias{donut}
\title{Simple donut chart (to be used parsimoniously), can be a pie chart}
\usage{
donut(
df,
x,
y,
alpha = 1,
x_title = NULL,
title = NULL,
subtitle = NULL,
caption = NULL,
arrange = TRUE,
hole_size = 3,
add_text = TRUE,
add_text_treshold_display = 5,
add_text_color = "white",
add_text_suffix = "",
theme = theme_reach(legend_reverse = TRUE)
)
}
\arguments{
\item{df}{A data frame.}
\item{x}{A character column or coercible as a character column. Will give the donut's fill color.}
\item{y}{A numeric column.}
\item{alpha}{Fill transparency.}
\item{x_title}{The x scale 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{arrange}{TRUE or FALSE. Arrange by highest percentage first.}
\item{hole_size}{Hole size. Default to 3. If less than 2, back to a pie chart.}
\item{add_text}{TRUE or FALSE. Add the value as text.}
\item{add_text_treshold_display}{Minimum value to add the text label.}
\item{add_text_color}{Text color.}
\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 donut chart to be used parsimoniously
}
\description{
Simple donut chart (to be used parsimoniously), can be a pie chart
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 246 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 55 KiB

After

Width:  |  Height:  |  Size: 51 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 50 KiB

After

Width:  |  Height:  |  Size: 45 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 60 KiB

After

Width:  |  Height:  |  Size: 58 KiB

Before After
Before After

Binary file not shown.

After

Width:  |  Height:  |  Size: 111 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 108 KiB

After

Width:  |  Height:  |  Size: 109 KiB

Before After
Before After

Binary file not shown.

After

Width:  |  Height:  |  Size: 141 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 182 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 125 KiB

After

Width:  |  Height:  |  Size: 125 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 320 KiB

After

Width:  |  Height:  |  Size: 319 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 167 KiB

After

Width:  |  Height:  |  Size: 166 KiB

Before After
Before After

88
man/lollipop.Rd Normal file
View file

@ -0,0 +1,88 @@
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/lollipop.R
\name{lollipop}
\alias{lollipop}
\title{Simple bar chart}
\usage{
lollipop(
df,
x,
y,
flip = TRUE,
wrap = NULL,
arrange = TRUE,
point_size = 3,
point_color = cols_reach("main_red"),
point_alpha = 1,
segment_size = 1,
segment_color = cols_reach("main_grey"),
segment_alpha = 1,
alpha = 1,
x_title = NULL,
y_title = NULL,
title = NULL,
subtitle = NULL,
caption = NULL,
add_text = FALSE,
add_text_size = 3,
add_text_suffix = "",
add_text_color = "white",
add_text_fontface = "bold",
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{flip}{TRUE or FALSE. Default to TRUE or horizontal lollipop plot.}
\item{wrap}{Should x-labels be wrapped? Number of characters.}
\item{arrange}{TRUE or FALSE. Arrange by highest percentage first.}
\item{point_size}{Point size.}
\item{point_color}{Point color.}
\item{point_alpha}{Point alpha.}
\item{segment_size}{Segment size.}
\item{segment_color}{Segment color.}
\item{segment_alpha}{Segment alpha.}
\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{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 y value as text within the bubble.}
\item{add_text_size}{Text size.}
\item{add_text_suffix}{If percent is FALSE, should we add a suffix to the text label?}
\item{add_text_color}{Added text color. Default to white.}
\item{add_text_fontface}{Added text font face. Default to "bold".}
\item{theme}{Whatever theme. Default to theme_reach().}
}
\value{
A bar chart
}
\description{
Simple bar chart
}

View file

@ -8,7 +8,7 @@ theme_reach(
palette = "main",
discrete = TRUE,
reverse = FALSE,
font_family = "Leelawadee",
font_family = "Segoe UI",
title_size = 12,
title_color = cols_reach("main_grey"),
title_font_face = "bold",
@ -34,11 +34,19 @@ theme_reach(
axis_title_size = 11,
axis_title_color = cols_reach("main_grey"),
axis_title_font_face = "bold",
grid_x = FALSE,
grid_y = FALSE,
grid_color = cols_reach("main_lt_grey"),
grid_x_size = 0.1,
grid_y_size = 0.1,
axis_text_x_angle = 0,
axis_text_x_vjust = 0.5,
axis_text_x_hjust = 0.5,
grid_major_x = FALSE,
grid_major_y = FALSE,
grid_major_color = cols_reach("main_lt_grey"),
grid_major_x_size = 0.1,
grid_major_y_size = 0.1,
grid_minor_x = FALSE,
grid_minor_y = FALSE,
grid_minor_color = cols_reach("main_lt_grey"),
grid_minor_x_size = 0.05,
grid_minor_y_size = 0.05,
caption_position_to_plot = TRUE,
...
)
@ -102,15 +110,25 @@ theme_reach(
\item{axis_title_font_face}{Axis title font face. Default to "plain". Font face ("plain", "italic", "bold", "bold.italic").}
\item{grid_x}{Boolean. Do you need major grid lines for x-axis?}
\item{grid_major_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_major_y}{Boolean. Do you need major grid lines for y-axis?}
\item{grid_color}{Grid lines color.}
\item{grid_major_color}{Major grid lines color.}
\item{grid_x_size}{X line size.}
\item{grid_major_x_size}{Major X line size.}
\item{grid_y_size}{Y line size.}
\item{grid_major_y_size}{Major Y line size.}
\item{grid_minor_x}{Boolean. Do you need minor grid lines for x-axis?}
\item{grid_minor_y}{Boolean. Do you need minor grid lines for y-axis?}
\item{grid_minor_color}{Minor grid lines color.}
\item{grid_minor_x_size}{Minor X line size.}
\item{grid_minor_y_size}{Minor Y line size.}
\item{caption_position_to_plot}{TRUE or FALSE. Positioning to plot or to panel?}