Hi, I was trying to change the axises format (namely Thickness and font size) by modifying the default graph template. Can anyone suggest how could I do that? I am using Layout Overlay statements, but not sure which Options (or sub-options) may help.
While there may have several possibles ways to do it, but I am not sure where to start from.
I was using the Statistical style template and was hoping there is an straightforward way to override the default settings. Any ideas if I can change it by adding an Options functions or if I have to define my own style.
Lots of very useful (and free!) information and SAS-hosted DOC on the Support http://support.sas.com/ website. Some creative searches either using the website's SEARCH box or Google will yield results for your review.
Suggested Google advanced search argument, this topic / post:
and you will see in the above doc that the elements of interest are: GraphAxisLines, GraphValueText, GraphLabelText and GraphDataText (to name just a few)
To get you started with style templates, you might want to search for user group papers on creating style templates. With the recent introduction of ODS GRAPHICS, there are quite a few examples out there of creating custom style templates for use with ODS GRAPHICS.
The example below uses a custom STYLE template with SGPLOT. Every style element is a different color and every font is either a different color, a different font or a different size. So you should be able to figure out which style elements are controlling which pieces of the output -- based on visual clues.
class GraphFit /
linethickness = 5px
contrastcolor = pink;
class GraphAxisLines /
linethickness = 6px
contrastcolor = red;
class GraphDataText /
font = GraphFonts("GraphDataFont")
color = purple;
class GraphLabelText /
font = GraphFonts("GraphLabelFont")
color = green;
class GraphValueText /
font = GraphFonts("GraphValueFont")
** Make variable to only label certain cholesterol levels with;
** the gender (instead of labelling every data point).;
if cholesterol le 125 then labl = sex;
else if cholesterol ge 400 then labl=sex;
else labl=' ';
ods listing style=styles.thick;
ods html path='.' (url=none)
proc sgplot data=heart;
title '1) Changing Attributes with a Style';
reg y = ageatdeath x=cholesterol/ clm datalabel=labl;
yaxis values=(60 to 95 by 5);
ods _all_ close;