# chist: Circular Histogram and Rose Diagram In cplots: Plots for Circular Data

 chist R Documentation

## Circular Histogram and Rose Diagram

### Description

Function `chist` can be used to plot 2-dimensional histograms and rose diagrams for circular data.

### Usage

```chist(
x,
nbins = 36,
area.prop = TRUE,
prob = TRUE,
total.area = 1,
nlabels = 4,
col = "lightblue",
border = "skyblue4",
m = NA,
xlim = NULL,
ylim = NULL,
main = NULL
)
```

### Arguments

 `x` a numeric vector storing angular values between 0 and 2 pi, or an object that can be coerced to. `nbins` the number of bins of the circular histogram. Internally, it is rounded to a multiple of 4. `radius` the radius of the reference circle. If `radius = 0`, a rose diagram is produced; if `radius > 0`, a circular histogram is produced outside the reference circle. `area.prop` logical; if `TRUE`, an area-proportional transformation is applied; if `FALSE`, a height-proportional transformationis applied. `prob` logical; if `TRUE`, the circular histogram graphic is a representation of probability densities; if `FALSE`, a representation of frequencies. `total.area` a positive number specifying the total area under the density curve. If `total.area = NULL`, no scaling is applied, the plot is in the original scale. If `area.prop = TRUE`, the total area is automatically unity without scaling. `nlabels` integer, for the number of levels for the density/frequency values to be plotted; if `0`, no label is plotted `col` the color to fill the bars. `border` the color of the border around the bars. `m` the number of points within each bin to plot the circular histogram. The larger the number is, the smoother the plot looks. `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)

No return value

### Author(s)

Danli Xu <dxu452@aucklanduni.ac.nz>, Yong Wang <yongwang@auckland.ac.nz>

### References

Xu, D. and Wang, Y. (2020). Area-proportional Visualization for Circular Data. Journal of Computational and Graphical Statistics, 29, 351-357.

`cbarplot`, `cdensity`, `cdotplot`

### Examples

```# 600 observations from two von Mises distributions
library(circular)
x = c(rvonmises(200, circular(pi/4), 5), rvonmises(400, circular(pi), 20))

chist(x)                           # area-proportional circular histgram
chist(x, area = FALSE)             # height-proportional circular histgram
chist(x, radius=0)                 # area-proportional rose diagram
chist(x, radius=0, area=FALSE)     # height-proportional rose diagram

chist(x, prob=FALSE)               # labels for frequency
chist(x, nlabels=0)                # no label
chist(x, xlim=c(-1.7,1))           # use xlim
chist(x, area=FALSE, total=2)      # with scaling
chist(x, area=FALSE, total=NULL)   # without scaling

```

cplots documentation built on March 24, 2022, 9:05 a.m.