geom_quantiles | R Documentation |
In ggplot2
, geom_quantile()
is used to fit a quantile regression to the data and draws
the fitted quantiles with lines. However, geom_quantiles()
is mainly used to draw quantile lines
on serial axes. See examples
geom_quantiles( mapping = NULL, data = NULL, stat = "quantile", position = "identity", ..., lineend = "butt", linejoin = "round", linemitre = 10, 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 |
The statistical transformation to use on the data for this layer, as a string. |
position |
Position adjustment, either as a string naming the adjustment
(e.g. |
... |
Other arguments passed on to |
lineend |
Line end style (round, butt, square). |
linejoin |
Line join style (round, mitre, bevel). |
linemitre |
Line mitre limit (number greater than 1). |
na.rm |
If |
show.legend |
logical. Should this layer be included in the legends?
|
inherit.aes |
If |
geom_serialaxes_quantile
p <- ggplot(iris, mapping = aes( Sepal.Length = Sepal.Length, Sepal.Width = Sepal.Width, Petal.Length = Petal.Length, Petal.Width = Petal.Width ) ) + geom_path(alpha = 0.2) + coord_serialaxes(scaling = "variable") p + geom_quantiles(colour = c("red", "green", "blue"), quantiles = c(0.25, 0.5, 0.75), linewidth = 2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.