BookmarkSubscribeRSS Feed
Josiah
Calcite | Level 5

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?

3 REPLIES 3
ballardw
Super User

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.

Josiah
Calcite | Level 5

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
                          ;

ballardw
Super User

@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.

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

SAS Enterprise Guide vs. SAS Studio

What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 3 replies
  • 881 views
  • 0 likes
  • 2 in conversation