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 (August 2010, week 3)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Fri, 20 Aug 2010 10:29:21 -0400
Reply-To:   "Simon, Lorna" <Lorna.Simon@UMASSMED.EDU>
Sender:   "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:   "Simon, Lorna" <Lorna.Simon@UMASSMED.EDU>
Subject:   problems with proc gchart and annotate dataset
Content-Type:   text/plain; charset=us-ascii

I'm trying to create bar graphs and put the %, in numbers, above each of the bars. I'm working with code that SAS developed for me. the problem is that on some of the graphs I get the numbers and on some of them I don't. I can't see anything different in the code. For example, the following code writes the percents above the graphs:

/* Create an annotate data set to draw the confidence limits. */ data hope_anno; length color function $8; retain xsys ysys '2' hsys '4' when 'a' color 'red' size 1; set hope2;

/* Lower tick */ function='move'; xsys='2'; ysys='2'; midpoint=provider; y=lower; output; function='draw'; xsys='7'; ysys='2'; x=-2; y=lower; output; function='draw'; xsys='7'; ysys='2'; x=+4; y=lower; output;

/* Upper tick */ function='move'; xsys='2'; ysys='2'; midpoint=provider; y=upper; output; function='draw'; xsys='7'; ysys='2'; x=-2; y=upper; output; function='draw'; xsys='7'; ysys='2'; x=+4; y=upper; output;

/* Join upper and lower */ function='move'; xsys='2'; ysys='2'; midpoint=provider; y=lower; output; function='draw'; xsys='2'; ysys='2'; midpoint=provider; y=upper; output; run;

title1 j=center height=14pt font=arial "Consumer and Family Member Satisfaction Survey 2010" ; title2 j=center height=14pt font=arial "Percent of adults reporting positively about hope";

PROC gchart DATA=hope2; vbar provider / sumvar=pct_row sum annotate=hope_anno raxis=axis1; axis1 order=(0 to 100 by 10); run; quit;

and the following code does not write the percents above the bars: /* Create an annotate data set to draw the confidence limits. */ data self_determination_anno; length color function $8; retain xsys ysys '2' hsys '4' when 'a' color 'red' size 1; set self_determination2;

/* Lower tick */ function='move'; xsys='2'; ysys='2'; midpoint=provider; y=lower; output; function='draw'; xsys='7'; ysys='2'; x=-2; y=lower; output; function='draw'; xsys='7'; ysys='2'; x=+4; y=lower; output;

/* Upper tick */ function='move'; xsys='2'; ysys='2'; midpoint=provider; y=upper; output; function='draw'; xsys='7'; ysys='2'; x=-2; y=upper; output; function='draw'; xsys='7'; ysys='2'; x=+4; y=upper; output;

/* Join upper and lower */ function='move'; xsys='2'; ysys='2'; midpoint=provider; y=lower; output; function='draw'; xsys='2'; ysys='2'; midpoint=provider; y=upper; output; run;

title1 j=center height=14pt font=arial "Consumer and Family Member Satisfaction Survey 2010" ; title2 j=center height=14pt font=arial "Percent of adults reporting positively about self determination";

PROC gchart DATA=self_determination2; vbar provider / sumvar=pct_row sum annotate=self_determination_anno raxis=axis1; axis1 order=(0 to 100 by 10); run; quit;

I can't see anything different in the two sets of codes. What am I missing?

Any help would be appreciated. thanks


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