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 (September 2009, week 3)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Mon, 21 Sep 2009 14:22:50 -0500
Reply-To:     Robin R High <rhigh@UNMC.EDU>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Robin R High <rhigh@UNMC.EDU>
Subject:      Re: Reference line on PROC GCHART output
Comments: To: "Lane, Jim" <jim.lane@RBC.COM>
In-Reply-To:  <EE977A7ACA588B428067FF35914D38E904B3991D@SXGM-401.fg.rbc.com>
Content-Type: text/plain; charset="ISO-8859-1"

Jim,

The annotate capability can be quite flexible for the simple task of adding a vertical line; in the example below x=50 with xsys='1' implies to start at the middle (50%) of the graph area and x2 from 0 to 80 is the numerical scale for the vertical axis (ysys='2'). You may need to experiment to find the best value for x for the placement of the line to show past versus future. You can also easily change the line type, size, color, with other options.

DATA lne1; RETAIN xsys '1' ysys '2' when 'a'; LENGTH color $8 ; x=50 ; y=0 ; function='MOVE'; output; x=50 ; y=80 ; function='DRAW'; color='black'; line=1; size=2; output;

proc print; run;

proc gchart data=sashelp.class ; vbar age / discrete sumvar=height type=mean outside=mean raxis=axis1 width =8 annotate=lne1; run; quit;

Robin High UNMC

From: "Lane, Jim" <jim.lane@RBC.COM> To: SAS-L@LISTSERV.UGA.EDU Date: 09/21/2009 01:00 PM Subject: Reference line on PROC GCHART output Sent by: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>

Hi, All

I'm having trouble getting GCHART to co-operate. My program so far looks like this.

axis1 value=(h=0.5) ; axis5 value=(h=0.5) label=none order=('01oct2000'd to '01oct2012'd by qtr); proc gchart data=work.c; vbar month / type=sum sumvar=x subgroup=c axis=axis1 maxis=axis5 discrete ; run; quit;

This is producing a vertical bar chart as I expect. My problem is that I would like to divide the chart somehow by drawing a vertical reference line so that the bars for months in the past lie to the left of the line and the future is to the right. I've tried to do this with options such as:

href='01sep2009'd lref=2 cref=blue

This produces neither a reference line nor an error message. What am I doing wrong here?

-Jim Lane _______________________________________________________________________

This e-mail may be privileged and/or confidential, and the sender does not

waive any related rights and obligations. Any distribution, use or copying of this e-mail or the information it contains by other than an intended recipient is unauthorized. If you received this e-mail in error, please advise me (by return e-mail or otherwise) immediately.

Ce courrier électronique est confidentiel et protégé. L'expéditeur ne renonce pas aux droits et obligations qui s'y rapportent. Toute diffusion, utilisation ou copie de ce message ou des renseignements qu'il contient par une personne autre que le (les) destinataire(s) désigné(s) est interdite. Si vous recevez ce courrier électronique par erreur, veuillez m'en aviser immédiatement, par retour de courrier électronique ou par un autre moyen.


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