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

Hello folks:

 

Is there any way to force y-axis to show 1.00? See the plot below, that 1.00 is not included. The max values that I have to present on the y-axis are 1.55 or 1.54 and 0.93 or 0.94 for minimum values.

 

I tried myriad different combinations of (min to max by 0.0n) in my code below with no success. Attached is the underlying data=(have).

 

PLOT_INCLUDE1.png

Thanks for your time.

I greatly appreciate your help.

ods graphics ON;
OPTIONS NOTES; 
ods graphics/width=12in height=4.5in;
proc sgpanel data=HAVE noautolegend;
panelby agegrp/ novarname columns=4 rows=1;
styleattrs DATACONTRASTCOLORS=(BLUE green red);
series  x=PCT_MISS y=HazardRatio_Mean/GROUP=STAGE lineattrs=(pattern=solid);
series  x=PCT_MISS y=ONE/group=stage lineattrs=(pattern=dash) lineattrs=(thickness=4);
REFLINE 1 / LABEL = ('HR=1') lineattrs=(color=BLACK pattern=dash thickness=1.5) LABELPOS=MIN; 
colaxis min=1 max=100 grid values=(0 to 100 by 5) LABELATTRS=(Family=Arial Size=11);
rowaxis grid values=(0.93 to 1.54 by 0.01) LABELATTRS=(Family=Arial Size=11);
run;
1 ACCEPTED SOLUTION

Accepted Solutions
FreelanceReinh
Jade | Level 19

Hello @Cruise,

 

I'd probably use 0.92 to 1.56 by 0.04. This comes close to your current settings and includes 1.00. The slight compression of the axis could be compensated by reducing the OFFSETMIN= and OFFSETMAX= values to zero or a small positive value (if necessary).

 

Edit: Thanks for posting conveniently usable code and test data. 🙂

View solution in original post

2 REPLIES 2
FreelanceReinh
Jade | Level 19

Hello @Cruise,

 

I'd probably use 0.92 to 1.56 by 0.04. This comes close to your current settings and includes 1.00. The slight compression of the axis could be compensated by reducing the OFFSETMIN= and OFFSETMAX= values to zero or a small positive value (if necessary).

 

Edit: Thanks for posting conveniently usable code and test data. 🙂

Cruise
Ammonite | Level 13
Thanks a lot. It worked out perfectly!

sas-innovate-white.png

Missed SAS Innovate in Orlando?

Catch the best of SAS Innovate 2025 — anytime, anywhere. Stream powerful keynotes, real-world demos, and game-changing insights from the world’s leading data and AI minds.

 

Register now

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

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
  • 2 replies
  • 749 views
  • 1 like
  • 2 in conversation