View source: R/geom-serialaxes-density.R
geom_serialaxes_density | R Documentation |
Computes and draws kernel density estimates on serial axes coordinate
for each non-aesthetics component defined in the mapping aes()
.
geom_serialaxes_density( mapping = NULL, data = NULL, stat = "serialaxes_density", position = "identity_", ..., axes.sequence = character(0L), merge = TRUE, scale.y = c("data", "group"), as.mix = TRUE, positive = TRUE, prop = 0.9, na.rm = FALSE, orientation = NA, show.legend = NA, inherit.aes = TRUE ) stat_serialaxes_density( mapping = NULL, data = NULL, geom = "serialaxes_density", position = "stack_", ..., axes.sequence = character(0L), merge = TRUE, axes.position = NULL, scaling = c("data", "variable", "observation", "none"), bw = "nrd0", adjust = 1, kernel = "gaussian", n = 512, trim = FALSE, na.rm = FALSE, orientation = NA, 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, either as a | ||||||
position |
Position adjustment, either as a string naming the adjustment
(e.g. | ||||||
... |
Other arguments passed on to | ||||||
axes.sequence |
A vector to define the axes sequence. In serial axes coordinate, the sequence can be either
determined in | ||||||
merge |
Should | ||||||
scale.y |
one of
If the | ||||||
as.mix |
Logical. Within each group, if | ||||||
positive |
If | ||||||
prop |
adjust the proportional maximum height of the estimate (density, histogram, ...). | ||||||
na.rm |
If | ||||||
orientation |
The orientation of the layer. The default ( | ||||||
show.legend |
logical. Should this layer be included in the legends?
| ||||||
inherit.aes |
If | ||||||
geom |
The geometric object to use to display the data, either as a
| ||||||
axes.position |
A numerical vector to determine the axes sequence position;
the length should be the same with the length of | ||||||
scaling |
one of | ||||||
bw |
The smoothing bandwidth to be used.
If numeric, the standard deviation of the smoothing kernel.
If character, a rule to choose the bandwidth, as listed in
| ||||||
adjust |
A multiplicate bandwidth adjustment. This makes it possible
to adjust the bandwidth while still using the a bandwidth estimator.
For example, | ||||||
kernel |
Kernel. See list of available kernels in | ||||||
n |
number of equally spaced points at which the density is to be
estimated, should be a power of two, see | ||||||
trim |
If |
geom_density_
, geom_serialaxes
,
geom_serialaxes_quantile
, geom_serialaxes_hist
p <- ggplot(iris, mapping = aes(Sepal.Length = Sepal.Length, Sepal.Width = Sepal.Width, Petal.Length = Petal.Length, Petal.Width = Petal.Width, colour = Species, fill = Species)) + geom_serialaxes(alpha = 0.2) + geom_serialaxes_density(alpha = 0.5) + scale_x_continuous(breaks = 1:4, labels = colnames(iris)[-5]) + scale_y_continuous(labels = NULL) + xlab("variable") + ylab("") + theme(axis.text.x = element_text(angle = 45, vjust = 0.5)) p
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.