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

Hi SAS Community,

 

I'm using SAS EG, sgplot statement to do some charts. One problem I have is that the gridlines are too dispersedly distributed. Does anyone know how to make gridlines denser? I've tried setting specifically value = (1 to 100 by 10), but the problem is that I want it be more flexible so I don't need to manually input the minimum 1 and maximum 100.

 

Any ideas or directions is greatly appreciated.

 

Thanks!

1 ACCEPTED SOLUTION

Accepted Solutions
DanH_sas
SAS Super FREQ

GRID lines are tied to major tick marks, but MINORGRID lines are tied to minor ticks. One idea to try is the following:

 

1. Remove the REFLINE statement your're using now.

2. Add the GRID, MINOR, and MINORGRID option to your XAXIS or YAXIS statement

 

Post back and let us know if that gets you closer to what you want.

 

Thanks!
Dan

View solution in original post

3 REPLIES 3
DanH_sas
SAS Super FREQ

GRID lines are tied to major tick marks, but MINORGRID lines are tied to minor ticks. One idea to try is the following:

 

1. Remove the REFLINE statement your're using now.

2. Add the GRID, MINOR, and MINORGRID option to your XAXIS or YAXIS statement

 

Post back and let us know if that gets you closer to what you want.

 

Thanks!
Dan

changxuosu
Quartz | Level 8
Thank you so much Dan! What you told me is very difficult for me to find out by myself. That's exactly what I'm looking for....
changxuosu
Quartz | Level 8
HI Dan, a follow up question is that, do you know how to make the values associated with each minor tick to show?
now I have enough grid lines 🙂 but I want the values to show as well so the graph will be more informative. I searched online but didn't find anything. not even in the SAS docuementation. Any idea is appreciated greatly. Thanks!

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

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