```Date: Fri, 30 Sep 2005 22:41:45 -0400 Reply-To: "Richard A. DeVenezia" Sender: "SAS(r) Discussion" From: "Richard A. DeVenezia" Subject: Re: SAS graph Comments: To: sas-l@uga.edu df ss wrote: > Hi all, > I have a data like this > ID m1_L m1_M m1_H m2_L m2_M m2_H > 1 1 2 3 1 2 3 > 2 2 3 4 2 3 4 > > I would like using the data to draw a picture like > this > > 1 |--|--| |--|--| > 2 |--|--| |--|--| > m1 m2 > > I'm not quite if SAS has the function to do so. If > anyone knows that, pleas let me know. It would be a > great help. > Thanks a lot A little data transformation gets you close in one plot. In multiple plots, search the archives for scattermatrix.. -------------------------- data foo; input ID m1_L m1_M m1_H m2_L m2_M m2_H; cards; 1 1 2 3 1 2 3 2 2 3 4 2 3 4 run; data fooie/view=fooie; set foo; array bulb m1_L--m2_H; do _n_ = 1 to dim(bulb); vname = vname (bulb[_n_]); length cat1 cat2 \$5; cat1 = scan (vname,1,'_'); cat2 = scan (vname,2,'_'); value = bulb[_n_]; if cat1 ne lag(cat1) then group+1; if mod (group,2)=0 then value+10; OUTPUT; end; keep id cat1 cat2 value group; run; goptions reset=all ftext='Arial' htext=18pt; symbol1 v="|" i=join h=32pt w=3; axis1 order=2 to 1 by -1 offset=(40pct); axis2 order=1 to 4, 11 to 14 offset=(10pct) label=none value=none; proc gplot data=fooie; plot id*value=group / vaxis=axis1 haxis=axis2 nolegend; title "Fooie"; run; -------------------------- Richard A. DeVenezia http://www.devenezia.com/ ```

Back to: Top of message | Previous page | Main SAS-L page