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

Hi all:

 

I'm trying to show 1 through 100 on my x-axis. I tried min and max and values (1 to 100 by 5). I'm puzzled why max value is not fit with these options defined. I also tried wider margins of width and height in ods graphics with no effect on the x-axis to display 100.

PCT-MISS is the value for x-axis which has two discrete values 1 and 100. But I really need to keep my preliminary to the first (1) and last(100) value on the x-axis for the preliminary reporting purpose since actual simulation to generate continuous values in between 1-100 takes several hours.

 

age group by stage x axis cut.png

 

data have; 
input stage agegrp PCT_MISS HazardRatio_Mean;
cards;
2	1	1	1.000078818
2	1	100	0.997875822
2	2	1	1.000234554
2	2	100	1.016641396
2	3	1	1.000166999
2	3	100	1.019170973
2	4	1	1.00089071
2	4	100	1.102769743
3	1	1	1.000070482
3	1	100	1.013920794
3	2	1	1.000083965
3	2	100	1.009745343
3	3	1	1.000124663
3	3	100	1.025811161
3	4	1	1.000825056
3	4	100	1.084992888
4	1	1	1.000678051
4	1	100	1.095105729
4	2	1	1.001333298
4	2	100	1.142009733
4	3	1	1.002082559
4	3	100	1.203161412
4	4	1	1.00470426
4	4	100	1.509592193
;

Data is attached.

 

ods graphics/width=6in height=6in;
proc sgpanel data=have noautolegend;
panelby agegrp/ novarname columns=2 rows=2;
series  x=PCT_MISS y=HazardRatio_Mean/ GROUP=STAGE;
colaxis label='Labe X' min=1 max=100 grid values=(1 to 100 by 5);
rowaxis label='Label Y' grid values=(1 to 1.5 by 0.01);
title "My Title";
format stage stage. agegrp agegrp.; 
run;

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Reeza
Super User
Try 0 to 100 by 5, otherwise you get 1, 6, 11, etc. Not sure how the time to run the previous step relates to this, you're only using the summary data for this, which I'm assuming you've saved somewhere to avoid running it multiple times.

View solution in original post

3 REPLIES 3
Reeza
Super User
Try 0 to 100 by 5, otherwise you get 1, 6, 11, etc. Not sure how the time to run the previous step relates to this, you're only using the summary data for this, which I'm assuming you've saved somewhere to avoid running it multiple times.
Cruise
Ammonite | Level 13

@Reeza Reeza, I think I tried 0-100 by 5. Will try again shortly.  I mentioned previous steps because 0-100 by 5 worked fine on the other data where I had all incremental values for PCT_MISS from 1 thru 100. This summary dataset has only 1 and 100. Since this is the only difference between data worked vs not worked I thought not having filling values in between 1 and 100 might be causing this problem on the x-axis.

Cruise
Ammonite | Level 13
Reeza, this worked. I swear I tried 0-100 by 5 before. Thanks a lot!!!

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 3 replies
  • 811 views
  • 3 likes
  • 2 in conversation