| marginals | R Documentation |
Draws the distribution of the x and y variables along the edges of the plot, as a histogram, density curve or boxplot.
marginals(spec, x = "histogram", y = "histogram", size = 0.15)
spec |
A glyph_spec |
x |
Marginal type for x-axis: "histogram", "density", "boxplot", NULL |
y |
Marginal type for y-axis: "histogram", "density", "boxplot", NULL |
size |
Proportion of plot area for marginals (0.0 to 0.4) |
Modified glyph_spec
glyph(mtcars, x = wt, y = mpg) |>
mark_point(color = cyl) |>
marginals(x = "histogram", y = "density")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.