update documentation
This commit is contained in:
parent
26608c9437
commit
129834af5d
2 changed files with 47 additions and 16 deletions
|
|
@ -12,22 +12,24 @@ dumbbell(
|
||||||
point_size = 5,
|
point_size = 5,
|
||||||
point_alpha = 1,
|
point_alpha = 1,
|
||||||
segment_size = 2.5,
|
segment_size = 2.5,
|
||||||
segment_color = cols_reach("main_lt_grey"),
|
segment_color = color("light_blue_grey"),
|
||||||
group_x_title = NULL,
|
group_x_title = NULL,
|
||||||
group_y_title = NULL,
|
group_y_title = NULL,
|
||||||
x_title = NULL,
|
x_title = NULL,
|
||||||
title = NULL,
|
title = NULL,
|
||||||
subtitle = NULL,
|
subtitle = NULL,
|
||||||
caption = NULL,
|
caption = NULL,
|
||||||
line_to_y_axis = TRUE,
|
line_to_y_axis = FALSE,
|
||||||
line_to_y_axis_type = 3,
|
line_to_y_axis_type = 3,
|
||||||
line_to_y_axis_width = 0.5,
|
line_to_y_axis_width = 0.5,
|
||||||
line_to_y_axis_color = cols_reach("main_grey"),
|
line_to_y_axis_color = color("dark_grey"),
|
||||||
add_text = TRUE,
|
add_text = FALSE,
|
||||||
add_text_vjust = 2,
|
add_text_vjust = 2,
|
||||||
add_text_size = 3.5,
|
add_text_size = 3.5,
|
||||||
add_text_color = cols_reach("main_grey"),
|
add_text_color = color("dark_grey"),
|
||||||
theme = theme_reach(palette = "primary")
|
theme_fun = theme_dumbbell(),
|
||||||
|
scale_fill_fun = scale_fill_visualizer_discrete(),
|
||||||
|
scale_color_fun = scale_color_visualizer_discrete()
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
\arguments{
|
\arguments{
|
||||||
|
|
@ -75,7 +77,11 @@ dumbbell(
|
||||||
|
|
||||||
\item{add_text_color}{Text color.}
|
\item{add_text_color}{Text color.}
|
||||||
|
|
||||||
\item{theme}{A ggplot2 theme, default to `theme_reach()`}
|
\item{theme_fun}{A ggplot2 theme, default to `theme_dumbbell()`}
|
||||||
|
|
||||||
|
\item{scale_fill_fun}{A ggplot2 scale_fill function, default to `scale_fill_visualizer_discrete()`}
|
||||||
|
|
||||||
|
\item{scale_color_fun}{A ggplot2 scale_color function, default to `scale_color_visualizer_discrete()`}
|
||||||
}
|
}
|
||||||
\value{
|
\value{
|
||||||
A dumbbell chart.
|
A dumbbell chart.
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,21 @@
|
||||||
% Generated by roxygen2: do not edit by hand
|
% Generated by roxygen2: do not edit by hand
|
||||||
% Please edit documentation in R/theme_default.R
|
% Please edit documentation in R/theme_bar.R, R/theme_default.R,
|
||||||
\name{theme_default}
|
% R/theme_dumbbell.R, R/theme_point.R
|
||||||
|
\name{theme_bar}
|
||||||
|
\alias{theme_bar}
|
||||||
\alias{theme_default}
|
\alias{theme_default}
|
||||||
\title{ggplot2 theme wrapper with fonts and colors}
|
\alias{theme_dumbbell}
|
||||||
|
\alias{theme_point}
|
||||||
|
\title{Custom Theme for Bar Charts}
|
||||||
\usage{
|
\usage{
|
||||||
|
theme_bar(
|
||||||
|
flip = TRUE,
|
||||||
|
add_text = FALSE,
|
||||||
|
axis_text_x_angle = 0,
|
||||||
|
axis_text_x_vjust = 0.5,
|
||||||
|
axis_text_x_hjust = 0.5
|
||||||
|
)
|
||||||
|
|
||||||
theme_default(
|
theme_default(
|
||||||
title_font_family = "Carlito",
|
title_font_family = "Carlito",
|
||||||
title_size = 16,
|
title_size = 16,
|
||||||
|
|
@ -75,8 +87,20 @@ theme_default(
|
||||||
caption_color = color("dark_grey"),
|
caption_color = color("dark_grey"),
|
||||||
...
|
...
|
||||||
)
|
)
|
||||||
|
|
||||||
|
theme_dumbbell()
|
||||||
|
|
||||||
|
theme_point()
|
||||||
}
|
}
|
||||||
\arguments{
|
\arguments{
|
||||||
|
\item{flip}{Logical. Whether the plot is flipped (horizonal).}
|
||||||
|
|
||||||
|
\item{axis_text_x_angle}{Angle for x-axis text.}
|
||||||
|
|
||||||
|
\item{axis_text_x_vjust}{Vertical justification for x-axis text.}
|
||||||
|
|
||||||
|
\item{axis_text_x_hjust}{Horizontal justification for x-axis text.}
|
||||||
|
|
||||||
\item{title_font_family}{Title font family. Default to "Roboto Condensed".}
|
\item{title_font_family}{Title font family. Default to "Roboto Condensed".}
|
||||||
|
|
||||||
\item{title_size}{The size of the legend title. Defaults to 11.}
|
\item{title_size}{The size of the legend title. Defaults to 11.}
|
||||||
|
|
@ -149,12 +173,6 @@ theme_default(
|
||||||
|
|
||||||
\item{axis_title_font_face}{Axis title font face. Default to "plain". Font face ("plain", "italic", "bold", "bold.italic").}
|
\item{axis_title_font_face}{Axis title font face. Default to "plain". Font face ("plain", "italic", "bold", "bold.italic").}
|
||||||
|
|
||||||
\item{axis_text_x_angle}{Angle for the x-axis text.}
|
|
||||||
|
|
||||||
\item{axis_text_x_vjust}{Vertical adjustment for the x-axis text.}
|
|
||||||
|
|
||||||
\item{axis_text_x_hjust}{Vertical adjustment for the x-axis text.}
|
|
||||||
|
|
||||||
\item{grid_major_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_major_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?}
|
||||||
|
|
@ -181,6 +199,13 @@ theme_default(
|
||||||
|
|
||||||
\item{font_family}{The font family for all plot's texts. Default to "Segoe UI".}
|
\item{font_family}{The font family for all plot's texts. Default to "Segoe UI".}
|
||||||
}
|
}
|
||||||
|
\value{
|
||||||
|
A custom theme object.
|
||||||
|
|
||||||
|
A custom theme object.
|
||||||
|
}
|
||||||
\description{
|
\description{
|
||||||
Give some reach colors and fonts to a ggplot.
|
Give some reach colors and fonts to a ggplot.
|
||||||
|
|
||||||
|
Theme for dumbbell charts based on theme_default.
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue