# Visualization issues in SAS

#### jbwettergreen

##### New Member
I'm having two specific issues with proc gchart in SAS (code and graph attached):

1) I cannot seem to fill my error bars. I know it is possible, but I've read through the support for both SAS/GOPTIONS and PROC GCHART to no avail. You can view them on the attached picture. If someone could point me in the right direction, that would be awesome.

2) Solved this second issue! :tup:

Any help would be much appreciated!

Best

Code:
*Visualization;
goptions reset=all noborder cback=cxfff1e0 ftext=("Arial/Italic");

title1 f="Arial/Italic" "Graf (uvektede tall) - work_stat*obesity by agegroup";
axis1 style=1 value=(font=arial) label=(f="Arial/Italic" "BMI=>30");
axis2 style=1 value=(font=arial) label=(/*a=90*/ f="Arial/Italic" "Andel i jobb " /*j=c*/ /*j=r*/ "(CLM=95%)");
axis3 style=1 value=(font=arial) label=(f="Arial/Italic" "Aldersgruppe");
pattern1 color=cxFFA07A;

proc gchart data=haag;
hbar obesity/			discrete type=mean
sumvar=work_stat mean
inside=mean
group=aldersgruppe2
errorbar=bars
cerror=cx800000
ca=cx83838c
coutline=cx83838c
woutline=1
clm=95
noframe
raxis=axis2
maxis=axis1
gaxis=axis3
width=2;
run;

Last edited:

#### hlsmith

##### Omega Contributor
Sorry I haven't tried to make this graph before. Given the specificity of the question you may get quicker feedback for this questions on the Visualization Community @ SAS Communities (on their webpage).

Also, I wanted a little clarification, you want those rectangles that are outlined in red filed in? Just using the above figure as a reference, I don't find those boxes that aesthetically please or as interpretable as whiskers, but that is my own opinion.

#### jbwettergreen

##### New Member
I don't find those boxes that aesthetically please or as interpretable as whiskers, but that is my own opinion.
You weren't the only one, I got the same feedback from my colleagues and changed it. Easy enough way to solve the problem in general. For the sake of it, I'm uploading it again, in its final form. Please let me know what more could be done to it to make it more aesthetically pleasing

Edit: I realise that text and written information is in Norwegian so it makes literally no sense to anyone outside Scandinavia. On the left hand side you have agegroups and whether the respondents are obese. The bars represent the amount of people within each category who are working/have a job. On the right hand side you ahv enumber of respondents within each group (andel i gruppen), and the share of the respective group who are working/have a job.

#### hlsmith

##### Omega Contributor
Aesthetically:

-I would drop the peach background, it is too close to the bar color.

-I would also put a slightly greater space between the bars, which would make the tracking of the bars to right hand data not so hard to do. Let them breath a little bit more.