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.
new()Guide$new()
Create a Guide object.
title()Guide$title()
Return the title that should be displayed by this guide.
position()Guide$position()
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.
aesthetics()Guide$aesthetics()
The aesthetics represented by this Guide.
train()Guide$train(scale)
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.
train_layers()Guide$train_layers(layers, renderer)
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.
merge()Guide$merge(guide)
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.
render()Guide$render(panel, renderer)
Renders the guide.
set_title()Guide$set_title(title)
set_key()Guide$set_key(key)
Sets the $key for this Guide, which is a tibble::tibble() with
a column for each aesthetic and a .breaks and .labels column.
set_position()Guide$set_position(position)
Sets the $position() for this guide. Use NULL to hide,
waiver() to let the Renderer choose, or some other
Renderer-specific value.
make_key()Guide$make_key(scale, censor = TRUE)
Creates the $key based on a Scale, optionally censoring the breaks
to ensure they are within the Scale's $limits().
aesthetics_from_key()Guide$aesthetics_from_key(key)
clone()The objects of this class are cloneable with this method.
Guide$clone(deep = FALSE)
deepWhether to make a deep clone.
ggr6::Guide -> GuideNull
train()GuideNull$train(scale, layers)
train_layers()GuideNull$train_layers(layers, renderer)
render()GuideNull$render(panel, renderer)
clone()The objects of this class are cloneable with this method.
GuideNull$clone(deep = FALSE)
deepWhether to make a deep clone.