Desktop productivity for business analysts and programmers

SAS Graph Title fonts don't change?

Reply
New Contributor
Posts: 2

SAS Graph Title fonts don't change?

No matter what I try, the fonts in my graphs do not change.

 

I am using ODS Powerpoint to generate routine reports and graphs directly to Powerpoint.  I have used PROC TEMPLATE to set up my custom style.  For my Tables, generated through PROC TABULATE, my fonts and other elements seem to be working fine.  So I started building my charts.  No matter what I do, though, the fonts never change.  In the SAS results window, they are always ARIAL and always the same size.  When I open the results in Powerpoint, they are always what looks like Courier and in a small font.  They are also exactly the same no matter whether they are a title or and axis label or a value label.  I've tried changing the fonts in my PROC TEMPLATE.  Nothing changes.  I've tried adding FONT= and HEIGHT= to my title.  Still nothing changes.

 

Where else is there to look?

Super User
Posts: 13,283

Re: SAS Graph Title fonts don't change?

Which style is your Powerpoint using? If it wasn't based on the right parent then you may have problems.

 

Also showing code you have used where the "titles didn't change" might help. Proc template and the graphic procedure along with the ODS statement.

New Contributor
Posts: 2

Re: SAS Graph Title fonts don't change?

[ Edited ]

I created the style "Powerpointlight" per instructions I found elsewhere on SAS websites.  Then created my custom style based off of that.

 

Here is the first part of my custom style:

PROC TEMPLATE ;
    define style styles.capm;
        parent=styles.powerpointlight;

   style fonts /
      'TitleFont2' = ("Georgia, Palatino, <MTserif>, Times Roman",16pt)
      'TitleFont' = ("Georgia, Palatino, <MTserif>, Times Roman",16pt)
      'StrongFont' = ("Palatino, Book Antiqua, <MTserif>, Times Roman",10pt,bold)
      'EmphasisFont' = ("Palatino, Book Antiqua, <MTserif>, Times Roman",10pt,bold italic)
      'FixedEmphasisFont' = ("<MTmonospace>, Courier",16pt,italic)
      'FixedStrongFont' = ("<MTmonospace>, Courier",16pt,bold)
      'FixedHeadingFont' = ("<MTmonospace>, Courier",16pt,bold)
      'BatchFixedFont' = ("SAS Monospace, <MTmonospace>, Courier",16pt)
      'FixedFont' = ("<MTmonospace>, Courier",16pt)
      'headingEmphasisFont' = ("Georgia, Palatino, <MTserif>, Times Roman",16pt)
      'headingFont' = ("Georgia, Palatino, <MTserif>, Times Roman",16pt)
      'docFont' = ("Georgia, <MTserif>, Times Roman",16pt)
      'footFont' = ("Georgia, <MTserif>, Times Roman",16pt);

   class GraphFonts /
      'NodeDetailFont'     = ("Georgia, Palatino, <MTserif>, Times Roman",16pt)
      'NodeInputLabelFont' = ("Georgia, Palatino, <MTserif>, Times Roman",16pt)
      'NodeLabelFont' = ("Georgia, Palatino, <MTserif>, Times Roman",16pt)
      'NodeTitleFont' = ("Georgia, Palatino, <MTserif>, Times Roman",16pt)
      'GraphDataFont' = ("Georgia, Palatino, <MTserif>, Times Roman",16pt)
      'GraphUnicodeFont' = ("Georgia, Palatino, <MTserif>, Times Roman",16pt)
      'GraphValueFont' = ("Georgia, Palatino, <MTserif>, Times Roman",16pt)
      'GraphLabel2Font' = ("Georgia, Palatino, <MTserif>, Times Roman",16pt)
      'GraphLabelFont' = ("Georgia, Palatino, <MTserif>, Times Roman",16pt)
      'GraphFootnoteFont' = ("Georgia, Palatino, <MTserif>, Times Roman",16pt)
      'GraphTitleFont' = ("Arial",14pt,Bold)
      'GraphTitle1Font' = ("Georgia, Palatino, <MTserif>, Times Roman",16pt)
      'GraphAnnoFont' = ("Georgia, Palatino, <MTserif>, Times Roman",16pt);

 

And here is the graph code where I try to set the font as well:

        Title1 "My Graph Title"  f='Times' h=14pt ;

        proc gchart data=ChartData;

          vbar valuetype / discrete subgroup=ValueType group=quarter sumvar=Value
                           legend=legend1 space=0 gspace=4
                           maxis=axis1 raxis=axis2 gaxis=axis3
                           coutline=white cframe=white
                          ;

Super User
Posts: 13,283

Re: SAS Graph Title fonts don't change?


@Josiah wrote:

I created the style "Powerpointlight" per instructions I found elsewhere on SAS websites.  Then created my custom style based off of that.

 

Here is the first part of my custom style:

PROC TEMPLATE ;
    define style styles.capm;
        parent=styles.powerpointlight;

   style fonts /
      'TitleFont2' = ("Georgia, Palatino, <MTserif>, Times Roman",16pt)
      'TitleFont' = ("Georgia, Palatino, <MTserif>, Times Roman",16pt)
      'StrongFont' = ("Palatino, Book Antiqua, <MTserif>, Times Roman",10pt,bold)
      'EmphasisFont' = ("Palatino, Book Antiqua, <MTserif>, Times Roman",10pt,bold italic)
      'FixedEmphasisFont' = ("<MTmonospace>, Courier",16pt,italic)
      'FixedStrongFont' = ("<MTmonospace>, Courier",16pt,bold)
      'FixedHeadingFont' = ("<MTmonospace>, Courier",16pt,bold)
      'BatchFixedFont' = ("SAS Monospace, <MTmonospace>, Courier",16pt)
      'FixedFont' = ("<MTmonospace>, Courier",16pt)
      'headingEmphasisFont' = ("Georgia, Palatino, <MTserif>, Times Roman",16pt)
      'headingFont' = ("Georgia, Palatino, <MTserif>, Times Roman",16pt)
      'docFont' = ("Georgia, <MTserif>, Times Roman",16pt)
      'footFont' = ("Georgia, <MTserif>, Times Roman",16pt);

   class GraphFonts /
      'NodeDetailFont'     = ("Georgia, Palatino, <MTserif>, Times Roman",16pt)
      'NodeInputLabelFont' = ("Georgia, Palatino, <MTserif>, Times Roman",16pt)
      'NodeLabelFont' = ("Georgia, Palatino, <MTserif>, Times Roman",16pt)
      'NodeTitleFont' = ("Georgia, Palatino, <MTserif>, Times Roman",16pt)
      'GraphDataFont' = ("Georgia, Palatino, <MTserif>, Times Roman",16pt)
      'GraphUnicodeFont' = ("Georgia, Palatino, <MTserif>, Times Roman",16pt)
      'GraphValueFont' = ("Georgia, Palatino, <MTserif>, Times Roman",16pt)
      'GraphLabel2Font' = ("Georgia, Palatino, <MTserif>, Times Roman",16pt)
      'GraphLabelFont' = ("Georgia, Palatino, <MTserif>, Times Roman",16pt)
      'GraphFootnoteFont' = ("Georgia, Palatino, <MTserif>, Times Roman",16pt)
      'GraphTitleFont' = ("Arial",14pt,Bold)
      'GraphTitle1Font' = ("Georgia, Palatino, <MTserif>, Times Roman",16pt)
      'GraphAnnoFont' = ("Georgia, Palatino, <MTserif>, Times Roman",16pt);

 

And here is the graph code where I try to set the font as well:

        Title1 "My Graph Title"  f='Times' h=14pt ;

        proc gchart data=ChartData;

          vbar valuetype / discrete subgroup=ValueType group=quarter sumvar=Value
                           legend=legend1 space=0 gspace=4
                           maxis=axis1 raxis=axis2 gaxis=axis3
                           coutline=white cframe=white
                          ;


I suggest changing from Proc Gchart, which is device based graphics and uses some different settings than the ODS template for some output elements, to Proc Sgplot which will use the ODS style elements more consistently. SGPlot does not have direct equivalents of the maxis/gaxis pairs and the syntax for XAXIS and YAXIS as used by SGPlot is different than the AXIS statements used by the device based graph procedures such as GChart.

Ask a Question
Discussion stats
  • 3 replies
  • 64 views
  • 0 likes
  • 2 in conversation