BookmarkSubscribeRSS Feed
bsriv
Calcite | Level 5

 

 

 

Hi all,

 

I'm making a boxplot with proc sgplot and here is what I have

title "Individual Resting State Network Connectivities";
proc sgplot data=new_t;
styleattrs datacolors=(orange darkcyan cyan deyg silver red green pink green beige navy mediumpurple yellow orange blueviolet black blue);
vbox col1 / group=_name_ ;
run;

 

Now, this predictable produces the following, groups in ascending order

 

AscendingAscending

When I add in the following beforehand, it slightly screws up the order (ie, it's not a mirror image).  How do I fix this??

 

proc sort data=work.new_t out=new_t;
by MSC descending COL1;
run;

 

DescendingDescending

1 REPLY 1
Reeza
Super User

Have you tried the GROUPORDER option? 

 

If you have SAS 9.4TS1M3+ this should work for you. 

 

http://documentation.sas.com/?docsetId=grstatproc&docsetTarget=n1waawwbez01ppn15dn9ehmxzihf.htm&docs...

 


@bsriv wrote:

 

 

 

Hi all,

 

I'm making a boxplot with proc sgplot and here is what I have

title "Individual Resting State Network Connectivities";
proc sgplot data=new_t;
styleattrs datacolors=(orange darkcyan cyan deyg silver red green pink green beige navy mediumpurple yellow orange blueviolet black blue);
vbox col1 / group=_name_ ;
run;

 

Now, this predictable produces the following, groups in ascending order

 

AscendingAscending

When I add in the following beforehand, it slightly screws up the order (ie, it's not a mirror image).  How do I fix this??

 

proc sort data=work.new_t out=new_t;
by MSC descending COL1;
run;

 

DescendingDescending


 

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 1 reply
  • 1752 views
  • 1 like
  • 2 in conversation