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 = step/2,
tol = NULL,
direction = "inward",
base_r = 1,
shade = FALSE,
shape = FALSE,
group = NULL,
colour = "black",
colour_col = NULL,
size = 2,
alpha = 1,
axial = FALSE,
...,
color = NULL,
color_col = NULL
)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_sep(defaultstep / 2) offsets the first dot inward from the reference circle so its outer edge approximately abuts the circumference.- 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, color
Fixed point colour (ignored when
colour_colis set).coloris the American-spelling alias.- colour_col, color_col
Optional column name to map to the colour aesthetic.
color_colis the American-spelling alias.- size
Point size passed to
geom_point().- alpha
Fixed alpha. Ignored when
shade = TRUE.- axial
Logical; when `TRUE`, mirror each observation to `col + pi` before stacking, so the figure reads as bidirectional. Stacking is computed after mirroring, so each antipodal cluster stacks within itself. Default `FALSE`.
- ...
Additional arguments passed to
ggplot2::geom_point().
Value
A geom_point() layer.
