BookmarkSubscribeRSS Feed
Calcite | Level 5

Hi Guys,


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




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

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




Calcite | Level 5

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,







Registration is open! SAS is returning to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team. Register for just $495 by 12/31/2023.

If you are interested in speaking, there is still time to submit a session idea. More details are posted on the website. 

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.

Get the $99 certification deal.jpg



Back in the Classroom!

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

View all other training opportunities.

Discussion stats
  • 2 replies
  • 2 in conversation