# cdotplot: Circular Stacked Dot Plot In cplots: Plots for Circular Data

## Description

Function `cdotplot` can be used to plot 2-dimensional stacked dot plot for circular data.

## Usage

 ```1 2 3 4``` ```cdotplot(x, nbins = 36, radius = 1, unit = NA, area.prop = TRUE, total.area = 1, m = NA, col = "lightblue", border = "skyblue4", xlim = NULL, ylim = NULL, main = NULL, x.legend = "bottomright", y.legend = NULL) ```

## Arguments

 `x` a circular data object that is fully defined by the user. `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. `unit` the number of observations represented by each dot. If `unit > 1`, it means that each dot represents multiple observations. `area.prop` logical; if `TRUE`, an area-proportional transformation is applied; if `FALSE`, a height-proportional transformationis applied. `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. `m` the number of points within each bin to plot the circular dot plot. The larger the number is, the smoother the plot looks. `col` the color to fill the bars. `border` the color of the border around the bars. `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) `x.legend` x coordinate to plot the legend. `y.legend` y coordinate to plot the legend.

## Details

If the number of observations is relatively small, the usual circular stacked dot plot can be used with `unit = 1`. If the dataset is large, the dots may become too dense to visualize or count. Setting `unit` to be any positive integer to allow each dot to represent more than one observation. If the number of observations in one bin is not a multiple of the specified unit, a partial dot can be used to represent the remainder at the top of the bin.

## Author(s)

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

## References

Xu, D. and Wang, Y. (2019) Area-proportional Visualization for Circular Data (submitted).

## See Also

`cbarplot`, `cdensity`, `chist`

## Examples

 ``` 1 2 3 4 5 6 7 8 9 10``` ```# 30 observations from two von Mises distributions library(circular) x = c(rvonmises(10, circular(pi/4), 5), rvonmises(20, circular(pi), 20)) cdotplot(x) # area-proportional dot plot cdotplot(x, area = FALSE) # height-proportional dot plot # 900 observations from two von Mises distributions y = c(rvonmises(300, circular(pi/4), 5), rvonmises(600, circular(pi), 20)) cdotplot(y, nbins=76, unit = 10) # area-proportional (partial) dot plot cdotplot(y, nbins=76, unit = 10, area = FALSE) # height-proportional ```

cplots documentation built on May 2, 2019, 12:19 p.m.