Data visualization with SAS programming

proc gbarline bar color

Reply
Regular Contributor
Posts: 194

proc gbarline bar color

How do I specify the color of the bars when using proc gbarline (ie bar inj)?
Thank you.
proc gbarline data=test;
bar inj / sumvar=emp_avg
discrete;
plot / sumvar=rate;
run;quit
SAS Super FREQ
Posts: 864

Re: proc gbarline bar color

You should be able to do it using a PATTERN statement, such as:

pattern1 color=red;

Thanks!
Dan
SAS Employee
Posts: 963

Re: proc gbarline bar color

And also, if you're using the subgroup= so that the bars have multiple segments, you can control those colors using multiple pattern statements, such as:

pattern1 v=solid color=pink;
pattern2 v=solid color=blue;
etc

And, if you don't specify a color, then the ods style that's being used controls the color, which is another way to control it.
Post a Question
Discussion Stats
  • 2 replies
  • 193 views
  • 0 likes
  • 3 in conversation