Date: Fri, 31 Jul 2009 15:47:30 -0400 msz03@albany.edu "SAS(r) Discussion" Mike Zdeb Re: Gplot & Symbols text/plain;charset=iso-8859-1

hi ... this is a portion of the job you posted previously ...

data anon; set subset; function='symbol'; xsys='1'; ysys='1'; x=pr; y=wave; size=le1; if le1=1 then text='plus'; else text='dot'; when ='B'; run;

<more>

proc gplot data=subset; plot pr*wave=studyid/anno=anon haxis = axis1 vaxis = axis2; title "Plot of y by x"; run; quit;

here's the annotate step rewritten ...

data anon; retain function 'symbol' when 'b' xsys ysys '1'; set subset (rename=(pr=x wave=y)); size=le1; if le1=1 then text='plus'; else text='dot'; run;

so ... xsys and ysys should both have a value of 2 if you are using data values (pr and wave) to locate the symbols

retain function 'symbol' when 'b' xsys ysys '2';

and ... is either pr or wave a character variable???

for example, if pr is a character variable, the set statement would be ...

set subset (rename=(pr=xc wave=y));

and if le1 does have values of 0,1 as you have said earlier, then some symbols will have SIZE=0 ... not good

if the values are 0,1 ... then how about SIZE=le1 + 1 so size is either 1 or 2

-- Mike Zdeb U@Albany School of Public Health One University Place Rensselaer, New York 12144-3456 P/518-402-6479 F/630-604-1475

> I am getting closer but now I am trying to plot character and numeric > variables which works but when I add the annotate I get the following message: > > MINIMUM VARIABLES NOT MET - MUST HAVE X/XC, Y/YC IN DATASET > > Any suggestions. I have seen examples where x= and yc= have been used at the > same time with annotation. > > Thanks, > > Cara >

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