| mark_sina | R Documentation |
Draws every row as a point, spread sideways within its group
in proportion to the density of values at that height. The points fill
the same outline a mark_violin() with the same settings would draw, so
the two combine well.
Each point is still a row of the data, so tooltips, brushing and linked
selections work on individual rows, as they do for mark_point(). The
sideways positions are computed in R when the plot is compiled and are
the same every time.
mark_sina(
spec,
...,
data = NULL,
style = list(),
bw = "nrd0",
adjust = 1,
width = 0.9
)
spec |
A glyph_spec |
... |
Aesthetic mappings: |
data |
Optional per-mark data override |
style |
Named list of fixed visual properties |
bw |
Smoothing bandwidth, passed to |
adjust |
Multiplier for the bandwidth. Values above 1 give smoother curves. |
width |
Width of the spread at the highest density, as a fraction of the space for its group, between 0 and 1. |
Modified glyph_spec object with the sina mark added
glyph(mtcars, x = factor(cyl), y = mpg) |>
mark_violin() |>
mark_sina()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.