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 13:06:31 -0500
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: Bar Chart
Comments:   To: David Friedman <harrypotterdhf@EARTHLINK.NET>

This should work for you:

proc gchart data=xx; vbar type /percent outside=percent space=3; run;

HTH

Ya

On Tue, 1 Mar 2011 11:26:39 -0500, David Friedman <harrypotterdhf@EARTHLINK.NET> wrote:

>Hi, > >I am relatively new to SAS plots. We have SAS 9.2 installed at our site. I >want to produce a Bar Chart. There are 200 ID's (or some other number) and >each one may have types A thru F. An ID might have more than one. In the >sample input dataset below only ID's 1 thru 12 have a TYPE. Most of the time >the ID's will not have a TYPE. I wanted to create a Bar Chart with Bars of >TYPE (i.e. A, B, C, etc.) with the frequency and percent (based upon 200 >ID's in this example) on the y-axis. > >Input dataset: > >ID TYPE >-- ---- >1 A >2 B >3 A >4 D >5 E >6 F >7 A >8 A >9 B >10 B >11 C >12 D > >There would be a Bar for each TYPE of ID with the Frequency (% based on 200 >ID's) on the top of each Bar. An ID could have more than 1 TYPE. > >ID Frequency (%) >-- ------------- >A 4 (2.0%) >B 3 (1.5%) >C 1 (0.5%) >D 2 (1.0%) >E 1 (0.5%) >F 1 (0.5%) > >Footnote: Denominator is 200 possible ID's


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