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

How can I find out what attributes (thickness/color/pattern) are used for default axis gridlines in proc sgplot?

 

Using "prog sgplot", I specify grid option for yaxis as follows:
proc sgplot data=xxx;
....
yaxis label="Percent" values=(0 to 0.2 by 0.05) grid;

 

Now, I am creating a graph template and want to have the same gridlines that sgplot uses by default. But I need to specify the attributes (thickness/color/pattern) and I don't know what they are or how to find them.

 

1 ACCEPTED SOLUTION

Accepted Solutions
ghosh
Barite | Level 11
proc template;
 list styles; /*  list  available styles;*/
 source styles.htmlblue; /* contents of htmlblue style*/
 source styles.statistical; /* contents of statistical style 
  where you will find reference to styles for grid lines and background */
 run;

View solution in original post

3 REPLIES 3
DanH_sas
SAS Super FREQ

The default gridline attributes come from the GraphGridLines style element in the active ODS style.

ghosh
Barite | Level 11
proc template;
 list styles; /*  list  available styles;*/
 source styles.htmlblue; /* contents of htmlblue style*/
 source styles.statistical; /* contents of statistical style 
  where you will find reference to styles for grid lines and background */
 run;
lucydog
Fluorite | Level 6

Thank you ghosh for this super helpful reply.

 

For anyone with a similar issue this is a great tip sheet also

https://support.sas.com/rnd/app/ODSGraphics/TipSheet_GraphStyle.pdf

 

It addressed 2 related issues I was having, 1) I didn't know what style sheet I was using with sgplot; and 2) the info I needed was in the "parent" style not the style I was using

 

proc template;
source styles.pearl / expand;*style & parents;
run;

 

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
  • 1228 views
  • 1 like
  • 3 in conversation