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 (July 1999, week 2)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Wed, 14 Jul 1999 09:42:11 -0700
Reply-To:     "Lund, Pete" <Peter.Lund@CFC.WA.GOV>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         "Lund, Pete" <Peter.Lund@CFC.WA.GOV>
Subject:      GCHART patterns revisited
Content-Type: text/plain; charset="iso-8859-1"

I spoke a little soon when I said my problem was solved. To recap, the default assignment of pattern in a GCHART is alphabetical, based on the chart variable values. I want to have them based on the order of the bars - the first bar gets pattern1, etc. Matthew Zack pointed out the MIDPOINTS= options to list the order of the bars - this worked in my simple example.

The real data also has a group variable. If I specify the MIDPOINTS option and PATTERNID=MIDPOINTS the bars are the right color, but SAS suppresses the legend. If I take out the PATTERNID=MIDPOINTS the legend is displayed, but the bars are back to the default assignment of patterns. I've augmented my example below - if anyone has any further suggestions, I'd greatly appreciate it.

data test; input q $ x $ y; cards; x a 5 x b 3 x c 7 z a 5 z b 3 z c 7 ; run;

pattern1 c=red v=solid; pattern2 c=blue v=solid; pattern3 c=green v=solid;

title1 'Bar Color Order SHOULD BE Red, Blue, Green';

axis1 order='c' 'a' 'b' value=none label=none;

legend label=('legend label');

title2 'gets the legend, but the bar colors are wrong';

proc gchart data=test; vbar x / sumvar=y group=q subgroup=x maxis=axis1 legend=legend midpoints='c' 'a' 'b'; run; quit;

title2 'gets the bar colors, but the legend is suppressed';

proc gchart data=test; vbar x / sumvar=y group=q subgroup=x maxis=axis1 patternid=midpoint legend=legend midpoints='c' 'a' 'b'; run; quit;

Thanks-

Pete Lund WA State Caseload Forecast Council 515 15th Ave SE Olympia, WA 98504-0962 (360) 902-0086 - voice (360) 902-0084 - fax peter.lund@cfc.wa.gov <mailto:peter.lund@cfc.wa.gov>


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