Description Usage Arguments Format Examples
View source: R/geom-econodist.R
Like ggplot2::geom_boxplot()
you can either pass in pre-computed
values for "ymin", "median", and "ymax" or a single y column
which will then use stat_econodist()
to compute the needed
statistics.
1 2 3 4 5 6 7 8 9 10 11 12 13 | geom_econodist(mapping = NULL, data = NULL, stat = "econodist",
position = "dodge2", tenth_col = econ_tenth,
median_col = econ_median, ninetieth_col = econ_ninetieth,
median_point_size = NULL, endcap_adjust = 1.5, ..., na.rm = FALSE,
show.legend = NA, inherit.aes = TRUE)
GeomEconodist
stat_econodist(mapping = NULL, data = NULL, geom = "econodist",
position = "dodge2", ..., na.rm = FALSE, show.legend = NA,
inherit.aes = TRUE)
StatEconodist
|
mapping |
Set of aesthetic mappings created by |
data |
The data to be displayed in this layer. There are three options: If A A |
stat |
ggplot2 stat to use |
position |
Position adjustment, either as a string, or the result of a call to a position adjustment function. |
tenth_col, median_col, ninetieth_col, median_point_size |
colors for geom components |
endcap_adjust |
multipler to make endcaps wider/thinner |
... |
other arguments passed on to |
na.rm |
If |
show.legend |
logical. Should this layer be included in the legends?
|
inherit.aes |
If |
geom |
ggplot2 geom to use |
An object of class GeomEconodist
(inherits from Geom
, ggproto
, gg
) of length 7.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | ggplot(mammogram_costs, aes(x = city)) +
geom_econodist(
aes(
ymin = tenth,
median = median,
ymax = ninetieth
),
stat = "identity",
) +
scale_y_continuous(
expand = c(0,0),
position = "right",
limits = range(0, 800),
label = scales::comma
) +
coord_flip() +
labs(
x = NULL, y = NULL
)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.