% Generated by roxygen2: do not edit by hand % Please edit documentation in R/theme_bar.R, R/theme_default.R, % R/theme_dumbbell.R, R/theme_lollipop.R, R/theme_point.R \name{theme_bar} \alias{theme_bar} \alias{theme_default} \alias{theme_dumbbell} \alias{theme_lollipop} \alias{theme_point} \title{Custom Theme for Bar Charts} \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( title_font_family = "Carlito", title_size = 20, title_color = color("dark_grey"), title_font_face = "bold", title_hjust = NULL, title_position_to_plot = TRUE, subtitle_font_family = "Carlito", subtitle_size = 16, subtitle_color = color("dark_grey"), subtitle_font_face = "plain", subtitle_hjust = NULL, text_font_family = "Carlito", text_size = 14, text_color = color("dark_grey"), text_font_face = "plain", panel_background_color = "#FFFFFF", panel_border = FALSE, panel_border_color = color("dark_grey"), legend_position = "top", legend_direction = "horizontal", legend_justification = "center", legend_reverse = TRUE, legend_title_size = 14, legend_title_color = color("dark_grey"), legend_title_font_face = "plain", legend_title_font_family = "Carlito", legend_text_size = 14, legend_text_color = color("dark_grey"), legend_text_font_face = "plain", legend_text_font_family = "Carlito", facet_size = 15, facet_color = color("dark_grey"), facet_font_face = "bold", facet_font_family = "Carlito", facet_bg_color = color("lighter_grey"), axis_x = TRUE, axis_y = TRUE, axis_text_x = TRUE, axis_line_x = FALSE, axis_ticks_x = FALSE, axis_text_y = TRUE, axis_line_y = TRUE, axis_ticks_y = TRUE, axis_text_font_family = "Carlito", axis_text_size = 14, axis_text_color = color("dark_grey"), axis_text_font_face = "plain", axis_title_size = 15, axis_title_color = color("dark_grey"), axis_title_font_face = "plain", axis_text_x_angle = 0, axis_text_x_vjust = 0.5, axis_text_x_hjust = 0.5, grid_major_x = TRUE, grid_major_y = FALSE, grid_major_color = color("dark_grey"), grid_major_x_size = 0.1, grid_major_y_size = 0.1, grid_minor_x = TRUE, grid_minor_y = FALSE, grid_minor_color = color("dark_grey"), grid_minor_x_size = 0.05, grid_minor_y_size = 0.05, caption_font_family = "Carlito", caption_font_face = "plain", caption_position_to_plot = TRUE, caption_size = 12, caption_color = color("dark_grey"), ... ) theme_dumbbell() theme_lollipop( flip = TRUE, axis_text_x_angle = 0, axis_text_x_vjust = 0.5, axis_text_x_hjust = 0.5 ) theme_point() } \arguments{ \item{flip}{Logical. Whether the plot is flipped (horizontal).} \item{add_text}{TRUE or FALSE. Add values as text.} \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 "Carlito".} \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{title_hjust}{Title horizontal justification. Default to NULL. Use 0.5 to center the title.} \item{title_position_to_plot}{TRUE or FALSE. Positioning to plot or to panel?} \item{subtitle_font_family}{Subtitle font family. Default to "Carlito".} \item{subtitle_size}{The size of the subtitle. Defaults to 10.} \item{subtitle_color}{Subtitle color.} \item{subtitle_font_face}{Subtitle font face. Default to "plain". Font face ("plain", "italic", "bold", "bold.italic").} \item{subtitle_hjust}{Subtitle horizontal justification. Default to NULL. Use 0.5 to center the subtitle.} \item{text_font_family}{Text font family. Default to "Carlito".} \item{text_size}{The size of all text other than the title, subtitle and caption. Defaults to 10.} \item{text_color}{Text color.} \item{text_font_face}{Text font face. Default to "bold". Font face ("plain", "italic", "bold", "bold.italic").} \item{panel_background_color}{The color for the panel background color. Default to white.} \item{panel_border}{Boolean. Plot a panel border? Default to FALSE.} \item{panel_border_color}{A color. Default to REACH main grey.} \item{legend_position}{Position of the legend; Default to "right". Can take "right", "left", "top", "bottom" or "none".} \item{legend_direction}{Direction of the legend. Default to "vertical". Can take "vertical" or "horizontal".} \item{legend_justification}{In addition to legend_direction, place the legend. Can take "left", "bottom", "center", "right", "top".} \item{legend_reverse}{Reverse the color in the guide? Default to TRUE.} \item{legend_title_size}{Legend title size.} \item{legend_title_color}{Legend title color.} \item{legend_title_font_face}{Legend title font face. Default to "plain". Font face ("plain", "italic", "bold", "bold.italic").} \item{legend_title_font_family}{Legend title font family. Default to "Carlito".} \item{legend_text_size}{Legend text size.} \item{legend_text_color}{Legend text color.} \item{legend_text_font_face}{Legend text font face. Default to "plain". Font face ("plain", "italic", "bold", "bold.italic").} \item{legend_text_font_family}{Legend text font family. Default to "Carlito".} \item{facet_size}{Facet font size.} \item{facet_color}{Facet font color.} \item{facet_font_face}{Facet font face. Default to "plain". Font face ("plain", "italic", "bold", "bold.italic").} \item{facet_font_family}{Facet font family. Default to "Carlito".} \item{facet_bg_color}{Facet background color.} \item{axis_x}{Boolean. Do you need x-axis?} \item{axis_y}{Boolean. Do you need y-axis?} \item{axis_text_x}{Boolean. Do you need the text for the x-axis?} \item{axis_line_x}{Boolean. Do you need the line for the x-axis?} \item{axis_ticks_x}{Boolean. Do you need the line for the x-axis?} \item{axis_text_y}{Boolean. Do you need the text for the y-axis?} \item{axis_line_y}{Boolean. Do you need the line for the y-axis?} \item{axis_ticks_y}{Boolean. Do you need the line for the y-axis?} \item{axis_text_font_family}{Axis text font family. Default to "Carlito".} \item{axis_text_size}{Axis text size.} \item{axis_text_color}{Axis text color.} \item{axis_text_font_face}{Axis text font face. Default to "plain". Font face ("plain", "italic", "bold", "bold.italic").} \item{axis_title_size}{Axis title size.} \item{axis_title_color}{Axis title color.} \item{axis_title_font_face}{Axis title font face. Default to "plain". Font face ("plain", "italic", "bold", "bold.italic").} \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_color}{Major grid lines color.} \item{grid_major_x_size}{Major X 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_font_family}{Caption font family. Default to "Carlito".} \item{caption_font_face}{Caption font face. Default to "plain". Font face ("plain", "italic", "bold", "bold.italic").} \item{caption_position_to_plot}{TRUE or FALSE. Positioning to plot or to panel?} \item{caption_size}{The size of the caption. Defaults to 10.} \item{caption_color}{Caption color.} \item{...}{Additional arguments passed to [ggplot2::theme()].} } \value{ A custom theme object. A ggplot2 theme object A custom theme object. } \description{ Give some reach colors and fonts to a ggplot. Theme for dumbbell charts based on theme_default. A custom theme specifically designed for lollipop charts with appropriate grid lines and axis styling based on whether the chart is flipped (horizontal) or not. } \examples{ \dontrun{ library(ggplot2) df <- data.frame(x = letters[1:5], y = c(10, 5, 7, 12, 8)) ggplot(df, aes(x, y)) + geom_point() + theme_lollipop() } }