Description Usage Arguments Author(s) References See Also Examples
Function cdensity
can be used to plot 2dimensional
density curves for circular data.
1 2 3 
f 
an R function that is to be plotted as a circular density or frequency. 
radius 
the radius of the reference circle. If 
area.prop 
logical; if 
total.area 
a positive number specifying the total area under the
density curve. If 
nlabels 
integer, for the number of levels to be plotted; if

add 
logical; if 
n 
the number of points to plot the density curve. 
col 
the color of the density line. 
xlim 
numeric vectors of length 2, giving the x coordinates ranges. 
ylim 
numeric vectors of length 2, giving the y coordinates ranges. 
main 
the main title (on top) 
Danli Xu <dxu452@aucklanduni.ac.nz>, Yong Wang <yongwang@auckland.ac.nz>
Xu, D. and Wang, Y. (2019) Areaproportional Visualization for Circular Data (submitted).
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18  # 600 observations from two von Mises distributions
library(circular)
x = c(rvonmises(200, circular(pi/4), 5), rvonmises(400, circular(pi), 20))
dvm = function(x, mu=0, kappa=1) # von Mises density
exp(kappa * cos(x  mu)) * (2 * pi * besselI(kappa, 0))^(1)
f = function(x) 1/3 * dvm(x, pi/4, 5) + 2/3 * dvm(x, pi, 20)
cdensity(f) # plot the density in an areaproportional manner
chist(x) # circular histogram
cdensity(f, add=TRUE) # superimpose the density curve
chist(x, area=FALSE) # heightproportional circular histogram
cdensity(f, area=FALSE, add=TRUE) # superimpose the density curve
chist(x, radius=0) # rose diagrams
cdensity(f, radius=0, add=TRUE)
chist(x, radius=0, area=FALSE)
cdensity(f, radius=0, area=FALSE, add=TRUE)

Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.