Library: | graphic |
See also: | grpie dispcoxcomb plotcoxcomb |
Quantlet: | grcoxcomb | |
Description: | A coxcomb graph is a special pie chart. Its frequency is proportional to the area of the corresponding segment and the angles of the segments are all equal. Consequently, the frequency is proportional to the square of the radius of the segment. |
Usage: | gr = grcoxcomb(x, {col,} {text}) | |
Input: | ||
x | n x p matrix of user-defined data under investigation | |
col | optional, p x 1 matrix defining the color of the plotted data | |
text | optional, n x 1 matrix containing the text used to describe the plot | |
Output: | ||
gr | graphical object showing the corresponding coxcomb plot |
library("plot") x=readm("crimwar") col=#(0,1,4) plot(grcoxcomb(x.double,col,x.text))
This coxcomb plot contains one of the original data sets used by F. Nightingale. It shows the number of soldiers dying during the Crimean war due to injuries caused by war (black), because of diseases caused by the lack of hygienics (blue) and due to other causales (red).