How can I eliminate the borders in SGPLOT HISTOGRAMs?
ods graphics/reset;
ods listing gpath="!userprofile\desktop\";
data _;
do i=-1,0,1;
do j=1 to 5000;
x=i+rannor(1);
output;
end;
end;
run;
proc sgplot;
styleattrs datacolors=(red blue lime);
histogram x/group=i transparency=0.5;
run;
Here's the outcome.
Thanks for your help.
Which border do you want to remove? The one that goes all around the plot or the box with the axis?
The NOBORDER option on the Sgplot statement removes the right and top lines that connect to the axis.
Sorry for this late response, but I wanted to ask something similar to CBARLINE in PROC UNIVARIATE HISTOGRAM.
data _;
do i=1 to 5000;
x=rannor(1);
output;
end;
run;
proc univariate;
var x;
histogram/cfill=blue cbarline=red;
run;
Here's the outcome.
Hope this clarifies. Thanks for your help.
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 16. Read more here about why you should contribute and what is in it for you!
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.
Select SAS Training centers are offering in-person courses. View upcoming courses for: