geom_hdr_rug | R Documentation |
rug visualization for HDR plot
geom_hdr_rug( mapping = NULL, data = NULL, stat = "hdr", position = "identity", ..., na.rm = FALSE, show.legend = NA, inherit.aes = TRUE, sides = "bl", rug_width = unit(0.03, "npc"), prob = c(0.5, 0.95, 0.99) )
mapping |
Default: NULL |
data |
data |
stat |
stat |
position |
Default: "identity" |
... |
... |
na.rm |
Default: FALSE |
show.legend |
Default: NA |
inherit.aes |
Default: TRUE |
sides |
position to put rugs |
rug_width |
width of rugs, Default: unit(0.03, "npc") |
prob |
PARAM_DESCRIPTION, Default: c(0.5, 0.95, 0.99) |
Calculates and plots the rug plot of highest density regions.
library(ggplot2) ggplot(faithful, aes(x = waiting, y = eruptions)) + geom_point() + geom_hdr_rug()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.