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.
It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.
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.
Ready to level-up your skills? Choose your own adventure.