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.
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;
The default gridline attributes come from the GraphGridLines style element in the active ODS style.
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;
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;
Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
Register now!
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.
Ready to level-up your skills? Choose your own adventure.