Date: Thu, 27 Oct 2005 14:02: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: Mark Shadow area in Proc Gplot
Content-Type: text/plain; charset=ISO-8859-1
Another relatively simple method is to trick SAS by adding many lines of
vref, let them close to each other, it end up looks like a shadow:
proc gplot data=sashelp.class;
plot weight*height / vref=(100 to 110 by 0.2) cvref='yellow';
run;
Kind regards,
Ya Huang
On Thu, 27 Oct 2005 09:11:06 -0700, jordicantoni@GMAIL.COM wrote:
>Hi Richard,
>It has been very helpful for me.
>Thanks a milion¡¡
>
>Jordi
>
>
>
>Richard A. DeVenezia wrote:
>> jordicantoni@gmail.com wrote:
>> > Hi Every body,
>> >
>> > Does anyone know how to shadow a mark area on a graph with proc gplot,
>> > between two parallel lines defined by VREF? I.e. graphic from a
>> > variable Y and time, I want to shadow the area between time 2 and time
>> > 4.
>> >
>> > I have this graph, and I want to shadow the area between 0.7 and 1
>> >
>> > title1'Figure 11.3 (weeks): Mean Testosterone Levels During The Study
>> > For Each Treatment, ITT Population';
>> > proc gplot data=testo;
>> > plot testo*visit=drug/ VREF=0.7 1 vaxis=axis2 haxis=axis1
>> > legend=legend1 ;
>> > where drug ne .;
>> > format drug ttof.;
>> > format visit visit_2w.;
>> > run;quit;
>>
>> Jordi:
>>
>> A graphics annotation data set can do just what you want.
>> There is a slew of excellent information in the online help regarding
>> annotation data sets. For more complex annotations you would want to use
>> the annotation macros found in the SAS supplied %ANNOMAC. Beyond
annotation
>> is Data Step Graphics Interface (DSGI) with which you can draw _any_
image
>> you can imagine (limited to SAS/Graphs 256 color entries).
>>
>> --------------------------------------
>> data anno;
>> retain xsys '1'; * % of data area;
>> retain ysys '2'; * data values;
>>
>> length function $8;
>>
>> function='MOVE';
>> x=0; y=90; * x=left side, y=weight of 90 (weight is the y variable in
>> gplot);
>> OUTPUT;
>>
>> function='BAR';
>> x=100;y=120; * x=right side, y=weigt of 120;
>> color='CXD8D8D8'; * CXrgb, where rgb is in hex;
>> style='SOLID';
>> OUTPUT;
>> run;
>>
>> title "Ages";
>> goptions reset=all ftext="Comic Sans MS";
>> symbol1 v=dot i=join repeat=2;
>> proc gplot data=sashelp.class anno=anno;
>> plot weight*name=sex;
>> run;
>> quit;
>> --------------------------------------
>>
>> Richard A. DeVenezia
>> http://www.devenezia.com/
|