Date: Wed, 28 Oct 2009 14:15:47 -0400
Reply-To: Ya Huang <ya.huang@AMYLIN.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Ya Huang <ya.huang@AMYLIN.COM>
Subject: Re: Changing the font size in axis labels in SGPLOT
SG family is a total different animal. Many of the control to the
graph is moved to the style. So you have to use proc template to
modify the template to get what you want. Here is an example how
you can do it:
proc template;
define style myfont;
parent=styles.default;
style GraphFonts /
'GraphDataFont' = ("Helvetica",6pt)
'GraphUnicodeFont' = ("Helvetica",6pt)
'GraphValueFont' = ("Helvetica",16pt)
'GraphLabelFont' = ("Helvetica",8pt,bold)
'GraphFootnoteFont' = ("Helvetica",6pt,bold)
'GraphTitleFont' = ("Helvetica",6pt,bold)
'GraphAnnoFont' = ("Helvetica",6pt);
end;
run;
ods rtf file="c:\temp\junk.rtf" style=myfont;
proc sgplot data=sashelp.class;
scatter x=weight y=height;
run;
ods rtf close;
Here the GraphValueFont control the font size of the ticker,
GraphLabelFont controls the axis label font size. I set the ticker much
bigger than the label, so you can see the effect.
There seems a bug related to html destination, the same code when
change to html won't work as expected.
On Wed, 28 Oct 2009 09:41:18 -0700, Hoskins, Richard E. (DOH)
<Richard.Hoskins@DOH.WA.GOV> wrote:
>In the new v 9.2 graphics procedure SGPLOT (which is a really nice piece
>of work) one has all kinds of capability in making plots of several
>kinds, and some control over how axes appear (XAXIS & YAXIS) but ...
>
>How does one change the size of font for the labels for tic marks on the
>X and Y axes?
>
>
>________________________
>Dick Hoskins
>Epidemiologist
>EMS/Trauma
>WA DOH, Olympia
>richard.hoskins@doh.wa.gov
>_________________________
|