theme_ipea {ipeaplot} | R Documentation |
Ggplot theme for Ipea charts and figures
Description
Applies a custom theme for ggplot figures following the editorial guidelines used by the Institute for Applied Economic Research - Ipea. The function includes standardized formatting of options for axis lines, text,
Usage
theme_ipea(
axis_lines = "full",
axis_values = TRUE,
legend.position = "right",
grid.adjust = "horizontal",
x_breaks = NULL,
y_breaks = NULL,
expand_x_limit = TRUE,
expand_y_limit = TRUE,
x_text_angle = 0,
include_x_text_title = TRUE,
include_y_text_title = TRUE,
include_ticks = TRUE,
...
)
Arguments
axis_lines |
A character vector specifying the axis style. Valid options are
|
axis_values |
Logical value indicating whether to show text elements. If |
legend.position |
A character vector specifying the position of the
legend. Valid options are |
grid.adjust |
Defines whether the grid lines should be |
x_breaks |
Numeric. The number of breaks on the x-axis |
y_breaks |
Numeric. The number of breaks on the y-axis |
expand_x_limit |
Logical value that indicates whether the x-axis
boundary should be expanded. If |
expand_y_limit |
Logical value that indicates whether the y-axis
boundary should be expanded. If |
x_text_angle |
Numeric. Angle in degrees of the text in the x-axis. |
include_x_text_title |
Logical. Whether to include x text title Defaults to |
include_y_text_title |
Logical. Whether to include x text title. Defaults to |
include_ticks |
Logical. Whether to include ticks. Defaults to |
... |
Additional arguments to be passed to the |
Value
A custom theme for IPEA graphics.
See Also
Other ggplot2 theme functions:
scale_color_ipea()
,
scale_fill_ipea()
Examples
# Creating theme for ggplot2 graph using default arguments
library(ggplot2)
fig_raw <- ggplot() +
geom_col(data = mtcars, aes(x = hp , y = mpg, fill = cyl)) +
theme_ipea()