Draws stacked roughened dots for a Wilkinson-style dot plot. The dot diameter
is taken from dia (an npc-x fraction = the bin width) and converted to
device inches at draw time, so every dot is a true circle whatever the panel
aspect, and stacks are built upward from baseline by that diameter.
sketch_dotplot_grob(
x,
stackpos,
dia,
baseline = 0,
stackratio = 1,
roughness = 0.5,
n_passes = 2L,
seed = NULL,
fill_gp = gpar(),
outline_gp = gpar(),
name = NULL,
vp = NULL
)A SketchDotplotGrob grob subclass.
Npc [0,1] x of each dot (its bin centre), one per dot.
Integer stack position of each dot within its bin (1 = first).
Dot diameter as an npc-x fraction (scalar; the bin width).
Npc y the stacks grow from. Default 0.
Vertical spacing between stacked dots, as a fraction of the diameter. Default 1.
Sketch parameters.
gpar() for the solid dot fill (per-dot col recycled; NA
leaves dots unfilled).
gpar() for the roughened dot outline (per-dot col).
Passed to grid::gTree().
Other grob-layer:
sketch_arrow_grob(),
sketch_band_grob(),
sketch_callout_grob(),
sketch_ellipse_grob(),
sketch_engrave_grob(),
sketch_path_grob(),
sketch_polygon_grob(),
sketch_repel_grob(),
sketch_spray_grob(),
sketch_stroke_grob(),
sketch_wedge_grob()