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

📢

ANNOUNCEMENT

The early bird rate has been extended! Register by March 18 for just $695 - $100 off the standard rate.

 

Check out the agenda and get ready for a jam-packed event featuring workshops, super demos, breakout sessions, roundtables, inspiring keynotes and incredible networking events. 

 

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