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 open! SAS is returning to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team. Register for just $495 by 12/31/2023.
If you are interested in speaking, there is still time to submit a session idea. More details are posted on the website.
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.