r - geom_path diameter to scale with coordinate system -
i'm using ggplot plot trajectories. size (diameter or radius) of geom_path line respect coordinate system.
here reproducible code:
x <- c(1,5,3,7,6) y <- c(0,6,4,4,8) data <- as.data.frame(cbind(x, y)) ggplot(data, aes(x = x, y = y)) + geom_path(size = 2, lineend = "round") + coord_fixed(ratio = 1)
in case, i'd diameter of line 2 coordinate system units.
Comments
Post a Comment