Date: Wed, 1 Apr 2009 12:54:32 -0400
Reply-To: Ya Huang <ya.huang@AMYLIN.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Ya Huang <ya.huang@AMYLIN.COM>
Subject: Re: Proc GPLOT - Legend Question
Try to use a format:
proc format;
value censor
0='xx (n=xxx) ...'
1='yy (n=yyy) ...'
;
proc gplot ...
plot ...
format survival 4.1 pfs_dur 3. _censor_ censor.;
..
On Wed, 1 Apr 2009 12:33:37 -0400, Siddharth Jain <sjain@AVEOPHARMA.COM>
wrote:
>Ya,
>
>Thanks for your help - legend showed up. Now my problem is that:
>
>proc gplot data=surv;
> plot survival* pfs_dur = _censor_/legend=legend1 vaxis=axis2
>haxis=axis1 vref=0.5 cvref=r;
> format survival 4.1 pfs_dur 3.;
> title1 h=1 "PRS";
>run;
>quit;
>
>I used _censor_ variable to get the legend. But instead of displaying
>the censor values - I want to display the number of subjects, events and
>0 censors- in the legend.
>
>Pls guide.
>
>Thanks in advance for your help,
>Sid
>
>-----Original Message-----
>From: Huang, Ya [mailto:Ya.Huang@amylin.com]
>Sent: Wednesday, April 01, 2009 12:29 PM
>To: Siddharth Jain; SAS-L@LISTSERV.UGA.EDU
>Subject: RE: Re: Proc GPLOT - Legend Question
>
>Sorry, I just noticed that you do not have
>a z variable in the plot statement:
>
>plot y*x=z / legend=..
>
>Since no z variable, there is no need of legend, that's why
>it did not show the legend.
>
>-----Original Message-----
>From: Siddharth Jain [mailto:sjain@aveopharma.com]
>Sent: Wednesday, April 01, 2009 9:25 AM
>To: Huang, Ya; SAS-L@LISTSERV.UGA.EDU
>Subject: RE: Re: Proc GPLOT - Legend Question
>
>
>Hello Ya,
>
>Thanks for your help. Changing the position order did not fix it.
>
>-S
>
>
>
>-----Original Message-----
>From: Ya Huang [mailto:ya.huang@AMYLIN.COM]
>Sent: Wednesday, April 01, 2009 12:22 PM
>To: SAS-L@LISTSERV.UGA.EDU; Siddharth Jain
>Cc: Ya Huang
>Subject: Re: Proc GPLOT - Legend Question
>
>Position option has the syntax as:
>
>POSITION=(<BOTTOM | MIDDLE | TOP> <LEFT | CENTER | RIGHT> <OUTSIDE |
>INSIDE>)
>
>Yours has a wrong order. Change to position=(bottom center inside) will
>fix it.
>
>On Wed, 1 Apr 2009 11:57:52 -0400, Siddharth Jain <sjain@AVEOPHARMA.COM>
>wrote:
>
>>Hello,
>>
>>Below is the code I am using. I graph produced is fine - just that I
>don't
>>get the legend at all. Can you please suggest what I am doing wrong.
>>
>>Thanks in Advance,
>>Sid
>>
>>%annomac;
>>title;
>>footnote;
>>options orientation=landscape;
>>filename grfout "C:\try.jpg";
>>
>>goptions device=jpeg gsfname=grfout gsfmode=replace /*xpixels=2150
>>ypixels=1189 xmax=8.474in ymax=5.9in*/;
>>pattern1 color=grayCC;
>>
>>symbol1 i=stepj v=none c=blue line=4;
>>
>>axis1 label=(font='Times New Roman/bo' height=12pt "Days" ) /*order=(0
>to
>>3200 by 400)*/;
>>axis2 label=(a=90 font='Times New Roman/bo' height=12pt "Probability of
>PFR
>>(%)") minor=none;
>>
>>*legend1 label = ("Subject") position = (inside bottom middle) down=4
>frame
>>mode=protect ;
>>*legend1 label=none value=(h=2 font=swiss justify=left 'trtn' "&n0")
>>/*across=1 down=1*/ position=(top right inside) offset=(10pt)mode=share
>
>>cborder=black;
>>
>>legend1 label=("Try") position =(inside bottom middle) mode=protect
>>cborder=black
>> value=(color=blue height=1 "Censor") cframe = yellow;
>>
>>proc gplot data=surv;
>> plot survival* pfr_dur/legend=legend1 vaxis=axis2 haxis=axis1
>vref=0.5
>>cvref=r;
>> format survival 4.1 pfs_dur 3.;
>> title1 h=1 "PFR";
>>run;
>>quit;
>
>
>The information transmitted is intended only for the person or entity to
>which it is addressed and may contain confidential and/or privileged
>material. Any review, retransmission, dissemination or other use of, or
>taking of any action in reliance upon, this information by persons or
>entities other than the intended recipient is prohibited. If you
>received this in error, please contact the sender and delete the
>material from any computer
>
>
>The information transmitted is intended only for the person or entity to
which it is addressed and may contain confidential and/or privileged
material. Any review, retransmission, dissemination or other use of, or
taking of any action in reliance upon, this information by persons or
entities other than the intended recipient is prohibited. If you received
this in error, please contact the sender and delete the material from any
computer
|