View source: R/geom-serialaxes-hist.R
geom_serialaxes_hist | R Documentation |
Computes and draws histogram on serial axes coordinate for each non-aesthetics component
defined in the mapping aes()
.
geom_serialaxes_hist( mapping = NULL, data = NULL, stat = "serialaxes_hist", position = "stack_", ..., axes.sequence = character(0L), axes.position = NULL, 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_hist( mapping = NULL, data = NULL, geom = "serialaxes_hist", position = "stack_", ..., axes.sequence = character(0L), scaling = c("data", "variable", "observation", "none"), axes.position = NULL, binwidth = NULL, bins = NULL, center = NULL, boundary = NULL, breaks = NULL, closed = c("right", "left"), pad = FALSE, width = NULL, 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 | ||||||
axes.position |
A numerical vector to determine the axes sequence position;
the length should be the same with the length of | ||||||
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
| ||||||
scaling |
one of | ||||||
binwidth |
The width of the bins. Can be specified as a numeric value
or as a function that calculates width from unscaled x. Here, "unscaled x"
refers to the original x values in the data, before application of any
scale transformation. When specifying a function along with a grouping
structure, the function will be called once per group.
The default is to use the number of bins in The bin width of a date variable is the number of days in each time; the bin width of a time variable is the number of seconds. | ||||||
bins |
Number of bins. Overridden by | ||||||
center, boundary |
bin position specifiers. Only one, | ||||||
breaks |
Alternatively, you can supply a numeric vector giving
the bin boundaries. Overrides | ||||||
closed |
One of | ||||||
pad |
If | ||||||
width |
Bar width. By default, set to 90% of the |
geom_hist_
, geom_serialaxes
,
geom_serialaxes_quantile
, geom_serialaxes_density
p <- ggplot(NBAstats2021, mapping = aes(`FG%` = `FG%`, `3P%` = `3P%`, `FT%` = `FT%`, `OFG%` = `OFG%`, `O3P%` = `O3P%`, `OFT%` = `OFT%`, colour = Playoff, fill = Playoff)) + geom_serialaxes(alpha = 0.2, scaling = "variable") + geom_serialaxes_hist(alpha = 0.5, prop = 0.7, scaling = "variable") + scale_x_continuous(breaks = 1:6, labels = c("FG", "3P", "FT", "OFG", "O3P", "OFT")) + 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.