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-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

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.

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