BookmarkSubscribeRSS Feed
radhikaa4
Calcite | Level 5

Hi I have this certain code

 

proc sgplot data=a.data_out;

hbar trt_group / response=Percent group=scales groupdisplay=stack ;

run;

 

I would like to use RGB color format for 'scales' variables. I used pattern but it won't work

Scales variables has 7 ordinal scales: 0, 1, 2, 3, 4, 5, 6

 

Any help would be great!


THanks

Radhika

1 REPLY 1
Reeza
Super User

Same answer as yesterday, use DATACONTRASTCOLORS and DATACOLORS on the STYLEATTRS statement. 

 

 

Or use a data attribute map.

https://support.sas.com/documentation/cdl/en/grstatproc/65235/HTML/default/viewer.htm#n18szqcwir8q2n...

 

Different ways of specifying colors are listed here:

https://documentation.sas.com/?docsetId=graphref&docsetTarget=p0edl20cvxxmm9n1i9ht3n21eict.htm&docse...

 

PS. I'll also move this post to the graphics forum again.


@radhikaa4 wrote:

Hi I have this certain code

 

proc sgplot data=a.data_out;

hbar trt_group / response=Percent group=scales groupdisplay=stack ;

run;

 

I would like to use RGB color format for 'scales' variables. I used pattern but it won't work

Scales variables has 7 ordinal scales: 0, 1, 2, 3, 4, 5, 6

 

Any help would be great!


THanks

Radhika


 

sas-innovate-2026-white.png



April 27 – 30 | Gaylord Texan | Grapevine, Texas

Registration is open

Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

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