Learn R Programming

ggplot2 (version 4.0.1)

complete_theme: Complete a theme

Description

This function takes a theme and completes it so that it can be used downstream to render theme elements. Missing elements are filled in and every item is validated to the specifications of the element tree.

Usage

complete_theme(theme = NULL, default = theme_get())

Value

A theme object.

Arguments

theme

An incomplete theme object to complete, or NULL to complete the default theme.

default

A complete theme to fill in missing pieces. Defaults to the global theme settings.

Examples

Run this code
my_theme <- theme(line = element_line(colour = "red"))
complete_theme(my_theme)

Run the code above in your browser using DataLab