BookmarkSubscribeRSS Feed
emilys7
Calcite | Level 5

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!

1 REPLY 1
Jay54
Meteorite | Level 14

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;

SAS INNOVATE 2024

Innovate_SAS_Blue.png

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. 

Register now!

How to Concatenate Values

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.

Get the $99 certification deal.jpg

 

 

Back in the Classroom!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 1 reply
  • 814 views
  • 0 likes
  • 2 in conversation