View source: R/geom_bar_range.R
geom_col_range | R Documentation |
Creates a bar chart with explicitly defined ranges.
geom_col_range(
mapping = NULL,
data = NULL,
stat = "identity",
position = "identity",
...,
na.rm = FALSE,
show.legend = NA,
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 |
stat |
Defaults to "identity". |
position |
A position adjustment to use on the data for this layer. This
can be used in various ways, including to prevent overplotting and
improving the display. The
|
... |
Other arguments passed on to
|
na.rm |
If |
show.legend |
logical. Should this layer be included in the legends?
|
inherit.aes |
If |
A ggplot2
geom layer that can be added to a plot.
Required aesthetics:
Either x
or y
Either xmin
and xmax
or ymin
and ymax
# Basic example
library(ggplot2)
df <- data.frame(x = 1:3, ymin = -1:-3, ymax = 1:3)
ggplot(df, aes(x = x, ymin = ymin, ymax = ymax)) +
geom_col_range()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.