qbin_heatmap shows the distribution of the y
of variables for each quantile bin of x. It is an alternative to
qbin_boxplot(), fine graining the distribution per qbin().
qbin_barplot() highlights the median/mean of the quantile bins, while
a data.frame to be binned
character variable name used for the quantile binning
integer number of quantile bins.
integer minimum number of rows/data points that should be
in a quantile bin. If NULL it is initially sqrt(nrow(data))
logical if TRUE the quantile bins will overlap. Default value will be
FALSE.
integer vector with the number of bins to use for the x and y axis.
The type of heatmap to use. Either "gradient" or "size".
The number of column to be used in the layout.
If TRUE, use a different color for each category.
The color used for categorical variables.
The color used for low values in the heatmap.
The color used for high values in the heatmap.
Additional arguments to pass to the plot functions
A list of ggplot objects.
Other qbin plotting functions:
qbin_barplot(),
qbin_boxplot(),
qbin_lineplot()
# \donttest{
qbin_heatmap(
iris,
"Sepal.Length",
auto_fill = TRUE
)
#> `overlap` not specified, using `overlap=FALSE`
#> `min_bin_size`=12, using `n=12`
qbin_heatmap(
iris,
"Sepal.Length",
auto_fill = TRUE,
type = "size"
)
#> `overlap` not specified, using `overlap=FALSE`
#> `min_bin_size`=12, using `n=12`
qbin_heatmap(
iris,
"Sepal.Length",
overlap = TRUE,
auto_fill = TRUE
)
data("diamonds", package="ggplot2")
qbin_heatmap(
diamonds[c(1,7:9)],
x = "price",
n = 150
)
# }