rose_diag {CircSpaceTime}R Documentation

Rose diagram in ggplot2 inspired from rose.diag in package circular.

Description

Rose diagram in ggplot2 inspired from rose.diag in package circular.

Usage

rose_diag(x, bins = 15, color = "red", alpha = 1, start = 0,
  add = FALSE, template = "rad", direction = NULL)

Arguments

x

a vector of circular coordinates in radiants [0,2 \pi).

bins

number of bins

color

color of the line and of the fill

alpha

transparency

start

the starting angle of the 0 (the North)

add

add the rose_diag to an existing ggplot2 plot

template

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.

Value

The plot in ggplot2 format.

Examples



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)


[Package CircSpaceTime version 0.9.0 Index]