merge_element: Merge a parent element into a child element

Description Usage Arguments Value Examples

View source: R/theme.r

Description

This is a generic and element classes must provide an implementation of this method

Usage

1
2
3
4
5
6
7
merge_element(new, old)

## Default S3 method:
merge_element(new, old)

## S3 method for class 'element'
merge_element(new, old)

Arguments

new

The child element in the theme hierarchy

old

The parent element in the theme hierarchy

Value

A modified version of new updated with the properties of old

Examples

1
2
3
4
5
new <- element_text(colour = "red")
old <- element_text(colour = "blue", size = 10)

# Adopt size but ignore colour
merge_element(new, old)

SahaRahul/ggplot2 documentation built on May 17, 2019, 1:46 p.m.