key_specialty | R Documentation |
These functions are helper functions for working with keys in guides. The functions described here are not widely applicable and may only apply to a small subset of guides. As such, it is fine to adjust the arguments of a speciality key, but swapping types is ill-advised.
key_sequence()
is a function factory whose functions create a regularly
spaced sequence between the limits of a scale. It is used in colour bar
guides.
key_bins()
is a function factory whose function create a binned key
given the breaks in the scale. It is used in colour steps guides.
key_sequence(n = 15)
key_bins(even.steps = FALSE, show.limits = NULL)
n |
A positive |
even.steps |
A |
show.limits |
A |
For key_sequence()
a function.
Other keys:
key_group
,
key_range
,
key_segments
,
key_standard
# An example scale
template <- scale_fill_viridis_c(limits = c(0, 10), breaks = c(2, 4, 6, 8))
# Retrieving colourbar and colourstep keys
key_sequence()(template)
key_bins()(template)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.