[prev in list] [next in list] [prev in thread] [next in thread] 

List:       sas-l
Subject:    Re: Sgplot keylegend, same group var, different values?
From:       Ya Huang <theyaatl () GMAIL ! COM>
Date:       2016-03-31 2:16:27
Message-ID: 2696920544073474.WA.theyaatlgmail.com () listserv ! uga ! edu
[Download RAW message or body]

vbarparm seems even more powerful than just doing what keshan's code shows. 
I randomly shuffled the variable names like below and got a very weird plot:

proc sgplot data=class; 
vbarparm category=age response=height / group=sex1 name="v1"; 
vbarparm category=name response=age / group=name name="v2";
keylegend "v1" "v2" / title=' '; 
run;

Who knows it may be very useful in some situation.

On Wed, 30 Mar 2016 20:57:48 -0400, Xia Keshan <12135835@QQ.COM> wrote:

>If you really want this, you need change your data structure .
>
>
>
>data class;
> set sashelp.class;
> length sex1 sex2 $ 40;
> sex1=cats(sex,'(height)');
> sex2=cats(sex,'(age)');
>run;
>proc sgplot data=class; 
>vbarparm category=name  response=height /group=sex1 name="v1"; 
>vbarparm category=name  response=age /group=sex2 name="v2";
>keylegend "v1" "v2" / title=' '; 
>run;
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic