LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (March 2011, week 1)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Tue, 1 Mar 2011 11:03:48 -0500
Reply-To:   Nat Wooding <nathani@VERIZON.NET>
Sender:   "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:   Nat Wooding <nathani@VERIZON.NET>
Subject:   Re: PROC GPLOT and Annotate: Examples of shaded vertical regions
In-Reply-To:   <7ECBE079B32869418D6545CC908E5CAF025D40DB@TLRUSMNEAGMBX26.ERF.THOMSON.COM>
Content-Type:   text/plain; charset="US-ASCII"

Matt

It looks like you want to draw horizontal and vertical lines from the axes to some specific point. Some years ago, I wanted to plot water temperatures in a river and superimpose horizontal lines that indicated such information as the range of spawning temperatures. Hence, you would see the plot of the temperatures starting in winter and continuing for some appropriate number of months. A horizontal band was overlaid that intersected the curve at some point. Unfortunately, I have not been able to find a sample plot but I do have the code that built the annotate data set. /* create an annotate data set that will draw the lines */ data anno; * draw low and high spawning temp lines - the length will be the period; set plot; sp=&fish; if species=:sp; ; call symput('spp',sp); length function color $8; retain function when 'a' xsys '2' ysys '2' color 'black'; * first, fix the low value; y=JandB_low; x=start; function='move'; output;* move pointer to start of line; function='draw'; size=3; x=stop;* this is the end of the line; output;

* now, do the upper line; x=start; y=JandB_high; function='move'; output;* move the pointer to the start of the line; function='draw'; x=stop; output;

run;

This may be a useful example. At another time, I did a similar project that drew filled bands that showed such information as spawning temperatures and lethal temperatures. I'm pretty sure that I still have the code but it would take me a little while to find it and I fear that I have to go do chores now.

Please let me know if you need me to look for that program. I think that I still have a hardcopy of the graph and I could scan it and send it to you off line.

Nat Wooding

-----Original Message----- From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of Matthew Pettis Sent: Tuesday, March 01, 2011 10:35 AM To: SAS-L@LISTSERV.UGA.EDU Subject: PROC GPLOT and Annotate: Examples of shaded vertical regions

Hi,

Working through annotations in SAS GRAPH GPLOT... I was wondering if anybody knows of a specific example I could use as a template. What I have is a graph with time on the X-axis and a count on the Y-axis. What I want to do is make shaded and transparent rectangles in the chart that go from the x-axis to the top and left and right boundaries at different times. That will highlight the graph for a timerange/timeranges that I want to call attention to. I'll be working through the documentation on the annotation dataset concept, but if anyone has a shortcut solution to this, I'd much appreciate hearing about it.

Thanks,

Matt


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