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 (October 2010, week 3)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Mon, 18 Oct 2010 15:11:39 -0500
Reply-To:   "Data _null_;" <iebupdte@GMAIL.COM>
Sender:   "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:   "Data _null_;" <iebupdte@GMAIL.COM>
Subject:   Re: GCHART (Sorry, forgot the code in previous message
Comments:   To: Randall Powers <powers_r@bls.gov>
In-Reply-To:   <201010181952.o9IJ3YRQ000391@malibu.cc.uga.edu>
Content-Type:   text/plain; charset=ISO-8859-1

The truncation is caused by the INPUT statement specification $ implies length $8 unless the length is established some other way. It seems that GCHART does not have ORDER=DATA so an AXIS statement and the MAXIS= option are used to order the bars.

data means1; INPUT Quote_type :$16. y ; Cards; Food 91.5 Housing 89.2 Apparel 55.4 Transportation 89.8 Medical 70.6 Recreation 84.2 Education 88.2 Other 91.2 ;;;; RUN;

axis1 order=('Food' 'Housing' 'Apparel' 'Transportation' 'Medical' 'Recreation' 'Education' 'Other');

TITLE 'Bar Graph '; proc gchart data=means1; vbar Quote_type / legend=legend1 sumvar=y discrete raxis=0 to 100 by 10 maxis=axis1; label y="RR"; run; quit;

On Mon, Oct 18, 2010 at 2:52 PM, Randall Powers <powers_r@bls.gov> wrote: > Note: Sorry, forgot the code in previous post. > > Hello All, > > Sorry if I already posted this. I honestly can't recall, and don't see it > listed. > > The code below produces a bar graph. It truncates the labels names of the > bars to eight characters (e.g. "transporation" gets truncated > to "transpor", and alphabetizes them. I wish for the full names, and for > the order in which the are input. How do I make these changes? > > Thanks! > > > data means1; > > INPUT Quote_type $ y ; > CARDS; > > Food 91.5 > Housing 89.2 > Apparel 55.4 > Transportation 89.8 > Medical 70.6 > Recreation 84.2 > Education 88.2 > Other 91.2 > > > ; > RUN; > > > TITLE 'Bar Graph '; > proc gchart data=means1; > vbar Quote_type / legend=legend1 sumvar=y discrete raxis=0 to 100 by 10; > label y="RR" > ; > run; > quit; >


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