Description Usage Arguments Aesthetics See Also Examples
View source: R/stat_slabinterval.R
A meta-stat for computing slab and interval functions for use with geom_slabinterval()
and its derivatives. Generally speaking not intended to be used directly: The API for
this stat is experimental and subject to change. This is used as the basis
for several other more directly useful stats whose APIs are more stable; it is recommended
to use those instead.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | stat_slabinterval(
mapping = NULL,
data = NULL,
geom = "slabinterval",
position = "identity",
...,
orientation = NA,
limits_function = NULL,
limits_args = list(),
limits = NULL,
slab_function = NULL,
slab_args = list(),
n = 501,
interval_function = NULL,
interval_args = list(),
point_interval = NULL,
.width = c(0.66, 0.95),
show_slab = TRUE,
show_interval = TRUE,
na.rm = FALSE,
show.legend = c(size = FALSE),
inherit.aes = TRUE
)
|
mapping |
Set of aesthetic mappings created by |
data |
The data to be displayed in this layer. There are three options: If A A |
geom |
Use to override the default connection between
|
position |
Position adjustment, either as a string, or the result of a call to a position adjustment function. |
... |
Other arguments passed to |
orientation |
Whether this geom is drawn horizontally ( |
limits_function |
A function that takes a data frame of aesthetics and returns a data frame with
columns |
limits_args |
Additional arguments passed to |
limits |
Limits for |
slab_function |
A function that takes a data frame of aesthetics and an |
slab_args |
Additional arguments passed to |
n |
Number of points at which to evaluate |
interval_function |
Custom function for generating intervals (for most common use cases the |
interval_args |
Additional arguments passed to |
point_interval |
A function from the |
.width |
The |
show_slab |
Should the slab portion of the geom be drawn? Default |
show_interval |
Should the interval portion of the geom be drawn? Default |
na.rm |
If |
show.legend |
Should this layer be included in the legends? Default is |
inherit.aes |
If |
These stats support the following aesthetics:
x
y
datatype
thickness
size
group
In addition, in their default configuration (paired with geom_slabinterval()
) the following aesthetics are supported by the underlying geom:
x
y
datatype
alpha
colour
colour_ramp
linetype
fill
shape
stroke
point_colour
point_fill
point_alpha
point_size
size
interval_colour
interval_alpha
interval_size
interval_linetype
slab_size
slab_colour
slab_fill
slab_alpha
slab_linetype
fill_ramp
ymin
ymax
xmin
xmax
width
height
thickness
group
See examples of some of these aesthetics in action in vignette("slabinterval")
.
Learn more about the sub-geom aesthetics (like interval_color
) in the scales documentation.
Learn more about basic ggplot aesthetics in vignette("ggplot2-specs")
.
See geom_slabinterval()
for the geom version, intended
for use on data that has already been translated into function evaluations, points, and intervals.
See stat_sample_slabinterval()
and stat_dist_slabinterval()
for families of stats
built on top of this stat for common use cases (like stat_halfeye
).
See vignette("slabinterval")
for a variety of examples of use.
1 2 3 4 | # stat_slabinterval() is typically not that useful on its own.
# See vignette("slabinterval") for a variety of examples of the use of its
# shortcut geoms and stats, which are more useful than using
# stat_slabinterval() directly.
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.