/*-------------------------------------------------------------------* * ORDDEMO SAS Demonstrate use of ordplot.sas * * * *-------------------------------------------------------------------* * Author: Michael Friendly * * Created: 9 May 1991 11:34:39 * * Revised: 9 May 1991 11:34:39 * * Version: 1.0 * * * *-------------------------------------------------------------------*/ *include goptions; *include macros(ordplot); goptions vsize=6.7in hsize=7in; title h=1.7 'Ord Plot: Deaths by Horsekicks' ; data horskick; input deaths corpsyrs; cards; 0 109 1 65 2 22 3 3 4 1 ; %ordplot(data=horskick, count=Deaths,label=Number of Deaths,freq=corpsyrs); %*gskip; title h=1.5 "Ord plot: Instances of 'may' in Federalist papers" ; data madison; input count blocks; cards; 0 156 1 63 2 29 3 8 4 4 5 1 6 1 ; %ordplot(data=madison,count=Count,label=%str(Occurrences of 'may'), freq=blocks); %*gskip; title h=1.7 'Ord Plot: Butterfly species collected in Malaysia'; data butfly; input count species @@; cards; 1 118 2 74 3 44 4 24 5 29 6 22 7 20 8 19 9 20 10 15 11 12 12 14 13 6 14 12 15 6 16 9 17 9 18 6 19 10 20 10 21 11 22 5 23 3 24 3 ; %ordplot(data=butfly,count=Count,label=Number collected, freq=species); %*gskip; title h=1.7 'Ord plot: Women in queues of length 10'; data queues; input women queues @@; cards; 0 1 1 3 2 4 3 23 4 25 5 19 6 18 7 5 8 1 9 1 10 0 ; %ordplot(data=queues,count=women,label=Number of women, freq=queues);