I need to change the font used in the body of a plot created by PROC SGPLOT. Documentation says to use LABELATTRS tor the axis labels, which is where I will start. Maybe I am putting it in the wrong place. Any ideas? This one is a box plot. I will also have to do this on a line plot.
Thank you...
proc sgplot data=ft2 nowall;
vbox change / extreme category = treatment clusterwidth = 0.5 ;
xaxis display = (noline nolabel noticks) discreteorder = data labelattrs=(family=courier size=8);
yaxis values = (-20 to 8 by 1);
run;
Where do you want to change font, exactly?
Either use code with a SAS supplied data set or provide example data.
You need to provide the name of the font pretty much as it appears in the Windows Font folder such as:
proc sgplot data=sashelp.class; vbox height /category=sex ; xaxis labelattrs=(family="Courier New Regular" size=15pt color=red); run;
Note the name in quotes.
This only changes the axis label value of "Sex". However your code is specifically excluding displaying the label (the display= options) so the Labelattrs has nothing to apply the font to.
Where do you want to change font, exactly?
Either use code with a SAS supplied data set or provide example data.
You need to provide the name of the font pretty much as it appears in the Windows Font folder such as:
proc sgplot data=sashelp.class; vbox height /category=sex ; xaxis labelattrs=(family="Courier New Regular" size=15pt color=red); run;
Note the name in quotes.
This only changes the axis label value of "Sex". However your code is specifically excluding displaying the label (the display= options) so the Labelattrs has nothing to apply the font to.
Available on demand!
Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.
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.