Bear with me as I am new to SAS and I'm assuming this is not a complicated question!
Using this code:
sgpanel data=histogram_data noautolegend;
title "PW Distribution by Concentration and Acceptance";
panelby accept concen / columns=2 rows=3 layout=lattice;
histogram prowid;
Label Prowid='Pronotum Width';
Label concen='Concentration (%)';
Label accept='Acceptance';
run;
I'm just trying to change the y axis from the default percent scale to frequency. When I try to use scale=count code it tells me it is out of order.
Any help out there?
Thanks!
First, in general it is easier to help if you supply a full working program (with data) that can be run to produce a graph. You can use one of the data sets in SASHELP to illustrate your issue. It also helps to know the release of SAS you are using (9.2, 9.3, etc.). I assume you left out the "proc" by error.
Having said that, with SAS 9.3 or higher release, you can use SCALE=count to get what you want. I do not have access to SAS 9.2 right now, but if you do, you can try this code.
proc sgpanel data=sashelp.cars noautolegend;
title "PW Distribution by Concentration and Acceptance";
panelby origin drivetrain / columns=3 rows=3 layout=lattice;
histogram mpg_city / scale=count;
run;
Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9. Sign up by March 14 for just $795.
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.