| geom_azimuthpoint | R Documentation |
geom_azimuthpoint() draws line segments (spokes) like geom_azimuth(), but also
places a point (marker) at the spoke's center (x, y).
Aesthetic rules:
linewidth, linetype affect the spoke only
shape affects the point only
colour, alpha affect both spoke and point
size sets the size of the point only
geom_azimuthpoint(
mapping = NULL,
data = NULL,
stat = "identity",
center = TRUE,
na.rm = FALSE,
show.legend = NA,
inherit.aes = TRUE,
size = 2,
...
)
mapping |
Set of aesthetic mappings created by |
data |
A data frame. If |
stat |
The statistical transformation to use on the data. Defaults to
|
center |
Logical; if |
na.rm |
If |
show.legend |
Logical. Should this layer be included in the legends? |
inherit.aes |
If |
size |
Size of the point marker (default = 2). |
... |
Other arguments passed on to |
A list of ggplot2 layers (spokes + points).
geom_azimuthpoint() understands the following aesthetics (required aesthetics in bold):
x
y
angle (in degrees, transformed internally; spoke only)
radius (spoke only)
colour (shared)
alpha (shared)
linewidth (spoke only)
linetype (spoke only)
shape (point only)
size (point only, or via argument)
fill (point only, for shapes that accept fill)
geom_azimuth(), ggplot2::geom_spoke(), ggplot2::geom_point()
set.seed(20250411)
df <- data.frame(
x = runif(5), y = runif(5),
angle_deg = rvm(5, mean = 90, kappa = 10),
radius = runif(5, 0.1, 1),
group = rep(1:2, length.out = 5)
)
if (require("ggplot2")) {
ggplot(data = df, aes(x, y, angle = angle_deg, radius = radius)) +
geom_azimuthpoint(aes(colour = factor(group), shape = factor(group)),
linewidth = 1.1, linetype = "dashed",
size = 3, alpha = 0.8
)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.