Rose diagram in ggplot2 inspired from rose.diag in package circular.
rose_diag(x, bins = 15, color = "red", alpha = 1, start = 0, add = FALSE, template = "rad", direction = NULL)
x
: a vector of circular coordinates in radiants .bins
: number of binscolor
: color of the line and of the fillalpha
: transparencystart
: the starting angle of the 0 (the North)add
: add the rose_diag to an existing ggplot2 plottemplate
: radiants or wind rose. the values are c("rad","wind_rose")
.. default is "rad"
direction
: 1, clockwise; -1, anticlockwise. For template = "rad" direction is -1 while for template = "wind_rose" direction is 1.The plot in ggplot2 format.
library(CircSpaceTime) x <- circular::rwrappedstable(200, index = 1.5, skewness = .5) x1 <- circular::rwrappedstable(200, index = 2, skewness = .5) x2 <- circular::rwrappedstable(200, index = 0.5, skewness = 1) rose_diag(x, bins = 15, color = "green") rose_diag(x1, bins = 15, color = "blue", alpha = .5, add = TRUE) rose_diag(x2, bins = 15, color = "red", alpha = .5, add = TRUE)