Keywords - Function groups - @ A B C D E F G H I J K L M N O P Q R S T U V W X Y Z

Library: graphic
See also: grpie grcoxcomb plotcoxcomb

Quantlet: dispcoxcomb
Description: plots a coxcomb graph, a special pie chart, for which the 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.

Reference(s):

Usage: dispcoxcomb(disp, r, c, x, {col,} {text})
Input:
disp display
r scalar, row number of the plot in disp
c scalar, column number of the plot in disp
x n x p matrix of user data
col p x 1 matrix defining the color of the plotted data
text n x 1 matrix of text describing the segments

Note:

Example:
library("plot")
x=readm("crimwar")
col=#(0,1,4)
disp=createdisplay(2,2)
dispcoxcomb(disp,1,1,x.double[1:6],col,x.text[1:6])
dispcoxcomb(disp,1,2,x.double[7:12],col,x.text[7:12])
dispcoxcomb(disp,2,1,x.double[13:18],col,x.text[13:18])
dispcoxcomb(disp,2,2,x.double[19:24],col,x.text[19:24])

Result:
This example generates four displays with different
coxcomb plots in each plot using one of the original data
sets of F. Nightingale. Each plot represents six
months. The number of soldiers who died during the Crimean war
due to injuries caused by the war is represented in black,
those dying from diseases caused by the lack of hygienics
are shown in blue and deaths due to other causales are plotted
in red.



Author: S. Klinke, L. Richter, 20011129
(C) MD*TECH Method and Data Technologies, 05.02.2006