Dataplot Vol 1 Vol 2

ROSE PLOT

Name:
ROSE PLOT
Type:
Graphics Command
Purpose:
Generate a rose plot.
Description:
The rose plot is a variation of the common pie chart. For both, we have k data points where each point denotes a frequency or a count. Pie charts and rose plots both use the area of segments of a circle to convey amounts. The pie chart uses a common radius and varies the central angle according to the data. That is, the angle is proportional to the frequency. So if the i-th point has count X and the total count is N, the i-th angle is 360*(X/N). For the rose plot, the angle is constant (i.e., divide 360 by the number of groups, k) and it is the square root of the radius that is proportional to the data.

According to Wainer (1997), the use of a common angle is the strength of the rose plot since it allows us to easily compare a sequence of rose plots (i.e., the corresponding segments in different rose plots are always in the same relative position). In particular, this makes rose plots an effective technique for displaying the data in contingency tables.

Friendly (2000) refers to the special case of 2x2 tables as the fourfold plot. As with the general case, an effective use of these plots is when we have a sequence of related 2x2 tables. Using the MULTIPLOT command, Dataplot can easily generate the sequence of rose plots or fourfold plots on a single page.

As an interesting historical note, Wainer points out that rose plots were used by Florence Nightingale (she referred to them as coxcombs).

Syntax 1:
ROSE PLOT <x>             <SUBSET/EXCEPT/FOR qualification>
where <x> is the variable containing counts;
and where the <SUBSET/EXCEPT/FOR qualification> is optional.

Use this syntax when you have a single variable of counts (or proportions).

Syntax 2:
ROSE PLOT <y1> <y2>             <SUBSET/EXCEPT/FOR qualification>
where <y1> is the first response variable;
<y2> is the second response variable;
and where the <SUBSET/EXCEPT/FOR qualification> is optional.

With this syntax, the <y1> and <y2> variables are cross-tabulated to generate a 2x2 table. The rose plot is then generated from this 2x2 table.

Examples:
ROSE PLOT X
ROSE PLOT X SUBSET TAG > 2
ROSE PLOT Y1 Y2
Note:
Each wedge is drawn with a common set of attributes. The attributes of the wedge borders are set with the LINE, LINE COLOR, and LINE THICKNESS commands (typically they are all set the same). The attributes of the interior are set with the various REGION commands. Any labels for the wedges must be set with the LEGEND or TEXT commands. The CROSS HAIR command can help in positioning labels. The program example below shows how to set the attributes. Dataplot does not support features such as 3d rose plots or exploding slices that are common in many business graphics programs.
Note:
You can use the CONDITION PLOT command for the case where you want to generate rose plots for a series of 2x2 tables. This is demomstrated in the program examples below.
Default:
None
Synonyms:
None
Related Commands:
 PIE CHART = Generates a pie chart. ROC Curve = Generates a ROC curve. ASSOCIATION PLOT = Generates an association plot. BINARY TABULATION PLOT = Generates a binary tabulation plot. HISTOGRAM = Generates a histogram. PERCENT POINT PLOT = Generates a percent point plot. PLOT = Generates a plot (including bar plots). LINE = Sets the types for plot lines. LINE COLOR = Sets the colors for plot lines. LINE THICKNESS = Sets the thicknesses for plot lines. REGION FILL = Sets the types for plot regions.
Reference:
Wainer (1997), Visual Revelations: Graphical Tales of Fate and Deception from Napolean Bonaporte to Ross Perot, Copernicus, Chapter 11.

Friendly (2000), Visualizing Categorical Data SAS Institute Inc., p. 90.

Applications:
Categorical Data Analysis
Implementation Date:
2007/4
Program 1:
```
let y = data 48 12 53 7
.
region fill on on on on
region fill color black blue red green
rose plot y
.
case asis
justification left
move 15 90
text Truecr()Positives
move 15 10
text Falsecr()Positives
move 75 90
text Falsecr()Negatives
move 75 10
text Truecr()Negatives
```

Program 2:
```
let n = 1
let x = sequence 1 100 1 5
.
let p = 0.8
let y1 = binomial rand numb for i = 1 1 100
let p = 0.92
let y2 = binomial rand numb for i = 1 1 100
.
let p = 0.6
let y1 = binomial rand numb for i = 101 1 200
let p = 0.95
let y2 = binomial rand numb for i = 101 1 200
.
let p = 0.96
let y1 = binomial rand numb for i = 201 1 300
let p = 0.98
let y2 = binomial rand numb for i = 201 1 300
.
let p = 0.3
let y1 = binomial rand numb for i = 301 1 400
let p = 0.2
let y2 = binomial rand numb for i = 301 1 400
.
let p = 0.9
let y1 = binomial rand numb for i = 401 1 500
let p = 0.2
let y2 = binomial rand numb for i = 401 1 500
.
region fill on on on on
region color black blue red green
rose plot y1 y2 subset x = 5
.
set conditioning plot type two variable rose
region fill off on on on on
region color white black blue red green
condition plot y1 y2 x
```

Program 3:
```
orientation square
.
.  Berkeley Admissions Data from p. 391 of
.  Friendly (2000), "Visualizing Categorical Data",
.  SAS Institute Inc.
.
512 313 1
353 207 1
89  19 2
17   8 2
120 205 3
138 279 3
202 391 4
131 244 4
53 138 5
22 351 5
94 299 6
24 317 6
end of data
.
multiplot corner coordinates 0 0 100 95
multiplot scale factor 2
multiplot 3 3
.
legend case asis
legend justification left
legend 2 justification right
legend 4 justification right
legend 1 coordinates 17 83
legend 2 coordinates 83 83
legend 3 coordinates 17 22
legend 4 coordinates 83 22
.
region fill on on on on
region fill color black blue red green
.
label case asis
title case asis
x1label Sex: Female
x2label Sex: Male
x2label displacement -74
.
let string t1 = Department A
let string t2 = Department B
let string t3 = Department C
let string t4 = Department D
let string t5 = Department E
let string t6 = Department F
.
let icnt = 0
let icnt2 =0
loop for k = 1 1 6
let icnt = icnt+1
let atemp = y1(icnt)
legend 1 ^atemp
let atemp = y2(icnt)
legend 2 ^atemp
let icnt = icnt+1
let atemp = y1(icnt)
legend 3 ^atemp
let atemp = y2(icnt)
legend 4 ^atemp
title ^t^k
let icnt2 = icnt2 + 1
if k = 3
let icnt2 = icnt2 + 1
end of if
if k = 5
let icnt2 = icnt2 + 1
end of if
multiplot 3 3 icnt2
rose plot y1 y2 subset x = k
box 15 20 85 90
end of loop
.
end of multiplot
.
case asis
justification center
move 30 97
text Rose Plots for Berkeley Admissions Data
```

Date created: 01/07/2008
Last updated: 12/04/2023