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

innovate-wordmarks-white-horiz.png

SAS is headed back to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team.

Interested in speaking? Content from our attendees is one of the reasons that makes SAS Innovate such a special event!

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.

Get the $99 certification deal.jpg

 

 

Back in the Classroom!

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

View all other training opportunities.

Discussion stats
  • 3 replies
  • 687 views
  • 1 like
  • 3 in conversation