Skip to contents

R6 class defining the properties of background elements

Public fields

fill

character defining the color filling of the background element

color

character defining the color of the background element frame/line

size

numeric defining the size of the background element frame/line

linetype

character defining the size of the background element frame/line

Methods


Method new()

Create a new BackgroundElement object

Usage

BackgroundElement$new(fill = NULL, color = NULL, size = NULL, linetype = NULL)

Arguments

fill

character color filling of the background element

color

character color of the frame of the background element

size

character size of the frame of the background element

linetype

character linetype of the frame of the background element

Returns

A new BackgroundElement object


Method createPlotElement()

Create a ggplot2::element_rect directly usable by ggplot2::theme.

Usage

BackgroundElement$createPlotElement(
  fill = NULL,
  color = NULL,
  size = NULL,
  linetype = NULL
)

Arguments

fill

character color filling of the background element

color

character color of the frame of the background element

size

character size of the frame of the background element

linetype

character linetype of the frame of the background element

Returns

An element_rect object.


Method clone()

The objects of this class are cloneable with this method.

Usage

BackgroundElement$clone(deep = FALSE)

Arguments

deep

Whether to make a deep clone.