proc sgplot
data=incid_mam;
yaxis label='Proportion of farms (%)' valueattrs=(size=16) labelattrs=(size=16);
xaxis label='Clinical mastits incidence (case/100 cow-year)' valueattrs=(size=16) labelattrs=(size=16);
histogram inc_1_tot_100/group=lfr scale=percent nbins=20 transparency=0.70;
density inc_1_tot_100/ type=kernel group=lfr;
run;
Hi, I'm running this code to create this simple histogram.
I have two questions:
First, how can I change or remove what I've put in yellow? In my data it's a binary category, but I want to precise it in a presentation of this graph.
Also, how can I "cut" my x axis, let's say at 75.
Thanks ,
Annie
You can remove the legend with the NOAUTOLEGEND option in the PROC SGPLOT statement.
You can use the MIN and MAX option in the XAXIS statement to control the XAXIS (although I'm not sure if it works for HISTOGRAM, you'll just have to try it and find out)
You can remove the legend with the NOAUTOLEGEND option in the PROC SGPLOT statement.
You can use the MIN and MAX option in the XAXIS statement to control the XAXIS (although I'm not sure if it works for HISTOGRAM, you'll just have to try it and find out)
Hi Paige! Thanks for the quick answer.Both of your answer are working!
Thanks
Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
Register now!
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.