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 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

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

View all other training opportunities.

Discussion stats
  • 3 replies
  • 985 views
  • 1 like
  • 2 in conversation