Date: Mon, 2 May 2005 14:04:56 -0400
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: Proc GChart/Axis LABEL in differenct colors
Not a problem, you can use the same trick, but this time, apply
it to axis statment, instead of pattern. Note also I dropped the
subgroup=month from the hbar options:
data xx;
do month=1 to 12;
pct=int(ranuni(2)*100);
output;
end;
run;
proc format;
value pctcol
0-50='red'
51-75='green'
76-100='blue'
;
options symbolgen;
proc sql noprint;
select 'c='||trim(put(pct,pctcol.-l))||' "'||trim(put(month,best.-l))||'"'
into :colfmt separated by ' '
from xx
;
axis1 v=(&colfmt);
proc gchart;
hbar month / discrete sumvar=pct nolegend maxis=axis1;
run;
166 axis1 v=(&colfmt);
SYMBOLGEN: Macro variable COLFMT resolves to c=red "1" c=blue "2"
c=blue "3" c=green "4" c=blue "5" c=blue "6" c=red "7" c=red "8"
c=red "9" c=red "10" c=green "11" c=red "12"
HTH
Ya
On Mon, 2 May 2005 13:29:56 -0400, Srinivas Reddy Valisekkagari
<reddy.srinivas@GMAIL.COM> wrote:
>Hi,
> I think i did a mistake in posting my question. Based on % value
>in x-axis , i want to the change the color of y-axis LABEL and NOT y-axis
value.
>
>Sorry about that.
>
>Any help will be appreciated.
>
>thanks,
>-Reddy