Hello everyone,
I'm creating a bar graph using PROC SGPLOT with three biochar fractions and four application doses. The graph is almost exactly how I want it, but I'm trying to apply different fill patterns to each bar group.
From the VBARPARM STATEMENT, the fillpatternattrs (or datafillpatterns) option should allow this, but I couldn't get it to work as expected. I would like to assign the patterns "L1, X1, and R1" to the three fractions for clearer visual distinction.
Has anyone successfully done this in SAS OnDemand for Academics or have any suggestions?
Thanks in advance!
ods graphics / width=800px height=600px attrpriority=none;
proc sgplot data=medias2;
styleattrs datacolors=(bgr blb dagry) datafillpatterns=(R1 L1 X1);
vbarparm category=dose
response=mean_pH / group=Fração2
groupdisplay=cluster
fillattrs=(transparency=0)
outlineattrs=(thickness=0 color=black)
name="barras";
yaxis label="Soil pH"
labelattrs=(family="Times New Roman" size=12 weight=bold)
valueattrs=(family="Times New Roman" size=12)
max=7;
xaxis label="Dose de biochar"
labelattrs=(family="Times New Roman" size=12 weight=bold)
valueattrs=(family="Times New Roman" size=12);
keylegend "barras" /
location=outside
position=right
titleattrs=(color=black family="Times New Roman" size=12)
valueattrs=(color=black family="Times New Roman" size=12)
noborder;
run;
