Places one point per observation at its heading angle, stacking coincident
angles radially to avoid overplotting. If stack_r is already a
column in data (from a prior call to stack_headings),
it is used as-is; otherwise stacking is computed internally.
Usage
add_stacked_headings(
data,
col = NULL,
step = 0.025,
start_sep = 0,
tol = NULL,
direction = "inward",
base_r = 1,
shade = FALSE,
shape = FALSE,
group = NULL,
colour = "black",
colour_col = NULL,
size = 2,
alpha = 1,
...
)Arguments
- data
A data frame with an angle column in radians, typically a
headings_frame.- col
Name of the angle column. Defaults to the
heading_colattribute whendatais aheadings_frame.- step, start_sep, tol, direction, base_r
Passed to
stack_headingswhenstack_ris absent. See that function for details.stepsets the gap between dots andstart_sepoffsets the first dot off the reference circle.- shade
If
TRUE, mapstack_nto the alpha aesthetic (scaled 0.2–1 across the observed range). Overrides the fixedalphaargument.- shape
Passed to
stack_headingsto request per-observation shape encoding. Shape is also applied whenshape_codeis already a column indata. Mapped to ggplot2 shape integers: 1 = hollow, 16 = filled, 21 = filled with ring.- group
Optional column name; stack within each group independently (e.g. one stacking per facet). Default
NULL.- colour
Fixed point colour (ignored when
colour_colis set).- colour_col
Optional column name to map to the colour aesthetic.
- size
Point size passed to
geom_point().- alpha
Fixed alpha. Ignored when
shade = TRUE.- ...
Additional arguments passed to
ggplot2::geom_point().
Value
A geom_point() layer.