BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
fengyuwuzu
Pyrite | Level 9

I am trying to plot histograms with proc sgpanel, but the default x-axis labeling is 0, 50, 100, 150. 

I want to show 0, 10, 20, 30, 40, ... or 0, 20, 40, 60, 80,...

I tried with rdi=(0 to 200 by 10) but it does not work. 

 

Any suggestions? Below is my code:

 

proc sgpanel data=exsum0 (where = (armcdn in (1, 2, 3)));
  panelby armcdn / rows=3 layout=rowlattice;
  histogram rdi /BINSTART=0 BINWIDTH = 10 rdi=(0 to 200 by 10);
run;
1 ACCEPTED SOLUTION

Accepted Solutions
Jay54
Meteorite | Level 14

I don't think there is an RDI option.  Did you get syntax errors in the log?

Use statement:

  COLAXIS values=(0 to 200 by 10);

 

proc sgpanel data=sashelp.cars;
  panelby origin / layout=rowlattice rows=3;
  histogram mpg_city;
  colaxis values=(0 to 100 by 10);
  run;

https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/grstatproc/p0vyc21mth0jrtn1c4jimudemip4.htm

 

View solution in original post

2 REPLIES 2
Jay54
Meteorite | Level 14

I don't think there is an RDI option.  Did you get syntax errors in the log?

Use statement:

  COLAXIS values=(0 to 200 by 10);

 

proc sgpanel data=sashelp.cars;
  panelby origin / layout=rowlattice rows=3;
  histogram mpg_city;
  colaxis values=(0 to 100 by 10);
  run;

https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/grstatproc/p0vyc21mth0jrtn1c4jimudemip4.htm

 

fengyuwuzu
Pyrite | Level 9

Thank you very much. This works. RDI is not an option, but my variable. 

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
  • 2 replies
  • 981 views
  • 0 likes
  • 2 in conversation