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
Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.
Register today!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: