BookmarkSubscribeRSS Feed
chim
Calcite | Level 5

I would like to plot a bar graph with a color gradient where the longest bar has a dark color while the shorter bar has a lighter color.

 

From the SAS documentation, Objects have the Style option in Option Pane where I can set the Gradient which specifies the colors that make up the color gradient. Through changing the Gradient, am I able to achieve what I want to do?

 

Also, I am unable to find the Gradient in the Style of Option Pane. A screenshot is attached.

 

1 REPLY 1
Ksharp
Super User
data county ;
	infile cards ;
	input county $ value id;
cards ;
CountyA	142 7
CountyB	65 6
CountyC	54 5
CountyD	43 4
CountyE	32 3
CountyF	21 2
CountyG	2  1
;
run ;
proc sgplot data=county noautolegend;
hbarparm category=county response=value /colorresponse=id
 colormodel=(lightgreen darkgreen) ;
run;

Ksharp_0-1671962642151.png

 

sas-innovate-white.png

Our biggest data and AI event of the year.

Don’t miss the livestream kicking off May 7. It’s free. It’s easy. And it’s the best seat in the house.

Join us virtually with our complimentary SAS Innovate Digital Pass. Watch live or on-demand in multiple languages, with translations available to help you get the most out of every session.

 

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
  • 1347 views
  • 1 like
  • 2 in conversation