Guide: Graphical represntation of Scales

Description Methods Super class Methods

Description

Guide objects are a graphical representation of Scales, in that they communicate the relationship between user data values and mapped data values. Each Scale must have a Guide, although this can be (and often is) GuideNull, which draws nothing). Guides which have the same name, class, breaks, and labels are merged together, such that in the final plot there may be more than one scale represented by one guide. All guides except GuideNull will probably have to be subclassed for each Renderer.

Methods

Public methods


Method new()

Usage
Guide$new()
Details

Create a Guide object.


Method title()

Usage
Guide$title()
Details

Return the title that should be displayed by this guide.


Method position()

Usage
Guide$position()
Details

Return the object describing the position of this guide (specific to the Renderer). A value of NULL means it should not be displayed; a value of waiver() means the position is unspecified.


Method aesthetics()

Usage
Guide$aesthetics()
Details

The aesthetics represented by this Guide.


Method train()

Usage
Guide$train(scale)
Details

Add information from a Scale to this guide. This creates the $key field, which is a tibble::tibble() with a column for each aesthetic and a .breaks and .labels column.


Method train_layers()

Usage
Guide$train_layers(layers, renderer)
Details

Add information from a LayerList to this object. This is used to assemble the default aesthetic values and geometry primatives that will be displayed by the guide.


Method merge()

Usage
Guide$merge(guide)
Details

Merges information from another guide into this guide. The default implementation is to merge only if the Guides have the same class, breaks, labels, title, and position. This would occur if a user maps the same column to two aesthetics. Returns TRUE if a merge occured, FALSE otherwise. This is usually called by GuideList's $merge_all() method.


Method render()

Usage
Guide$render(panel, renderer)
Details

Renders the guide.


Method set_title()

Usage
Guide$set_title(title)

Method set_key()

Usage
Guide$set_key(key)
Details

Sets the $key for this Guide, which is a tibble::tibble() with a column for each aesthetic and a .breaks and .labels column.


Method set_position()

Usage
Guide$set_position(position)
Details

Sets the $position() for this guide. Use NULL to hide, waiver() to let the Renderer choose, or some other Renderer-specific value.


Method make_key()

Usage
Guide$make_key(scale, censor = TRUE)
Details

Creates the $key based on a Scale, optionally censoring the breaks to ensure they are within the Scale's $limits().


Method aesthetics_from_key()

Usage
Guide$aesthetics_from_key(key)

Method clone()

The objects of this class are cloneable with this method.

Usage
Guide$clone(deep = FALSE)
Arguments
deep

Whether to make a deep clone.

Super class

ggr6::Guide -> GuideNull

Methods

Public methods

Inherited methods

Method train()

Usage
GuideNull$train(scale, layers)

Method train_layers()

Usage
GuideNull$train_layers(layers, renderer)

Method render()

Usage
GuideNull$render(panel, renderer)

Method clone()

The objects of this class are cloneable with this method.

Usage
GuideNull$clone(deep = FALSE)
Arguments
deep

Whether to make a deep clone.


paleolimbot/ggr6 documentation built on Feb. 5, 2020, 2:17 p.m.