Data visualization with SAS programming

SAS: How to plot Multiple X group (3 or more) using Stacked Bar

Reply
Occasional Contributor
Posts: 8

SAS: How to plot Multiple X group (3 or more) using Stacked Bar

Hi Guys,

 

Can SAS create multiple X group (3 or more) in a plot ? See image below.

 

multiX.PNG

 

This grouping can be done in JMP's Graph Builder, i hope i can code the same in SAS (9.4m3 - windows7)

 

And i hope to futher improve the plot by adding Line on Right Axis (if possible).

 

 

 

thanks in advance!

 

SAS Employee
Posts: 68

Re: SAS: How to plot Multiple X group (3 or more) using Stacked Bar

Hi Karem,

 

Are you familiar with annotate?

It seems to be the way to go according to those 2 samples:

  Sample 45124: Display multiple groups on the midpoint axis with PROC GCHART

  Sample 43865: Connect midpoints across groups with PROC GCHART

 

Cheers,

Damo

Occasional Contributor
Posts: 8

Re: SAS: How to plot Multiple X group (3 or more) using Stacked Bar

[ Edited ]

Hi Damo,

 

Thank you for the reference. I haven't use the annotate.

 

When i posted my question i have seen the sample 45124. That sample has 2 groups in X-axis.

 

And i can't find a solution to make it 3 groups or more. Could you help me on this portion?

 

2x group.PNG

 

I tried to familiarize myself on annotate, but i only found that the annotate facility, replace the 1st X-group and hide the orig 1st X-group (generated by vbar).

 

however, i don't have an idea on how to make 2 x-group from annotate and 1x group from VBAR (group function).

 

Using same data set from sample 45124, this x axis i would like to script. Is this possible in SAS ?

 

(from JMP)

3 xgroup.jpg

 

best regards,

 

Karem

 

 

Ask a Question
Discussion stats
  • 2 replies
  • 151 views
  • 0 likes
  • 2 in conversation