Skip to contents

R6 class defining the legend configuration of a ggplot object

Active bindings

caption

of legend defined as data.frame with caption properties

position

of legend as defined in Enum LegendPositions

font

Font object defining the font of the legend

background

Background object defining the background of the legend

title

character defining title of the legend

Methods


Method new()

Create a new LegendConfiguration object

Usage

LegendConfiguration$new(
  position = NULL,
  caption = NULL,
  title = NULL,
  font = NULL,
  background = NULL
)

Arguments

position

position of the legend as defined by enum LegendPositions

caption

data.frame containing the properties of the legend caption

title

character or Label object defining the title of the legend. A value of NULL removes the title.

font

Font object defining the font of the legend caption

background

BackgroundElement object defining the background of the legend

Returns

A new LegendConfiguration object


Method updatePlot()

Update legend configuration on a ggplot object

Usage

LegendConfiguration$updatePlot(plotObject)

Arguments

plotObject

ggplot object

Returns

A ggplot object with updated axis properties


Method clone()

The objects of this class are cloneable with this method.

Usage

LegendConfiguration$clone(deep = FALSE)

Arguments

deep

Whether to make a deep clone.