BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
crisgugiu
Fluorite | Level 6

Hi all,

I have somewhat of a time-sensitive question. I am trying to produce a professional graph to include in a report. I almost have the graph looking as I want but the fonts are terrible. I would like to use Garamond bold for the title and Garamond regular for the figures in the graph. I've been told that Proc template is the way to do this. However, I don't know it and its numerous options are a bit of a pain to navigate. I was wondering if someone could take a look at the code below and make a few recomendations for how to change the font type from the default. I've attached a short data file.

best,

Cristian

Title1 "Mean and 95% CI for College Readiness (SAT-V, SAT-M, College Enrollment) for 2006-2008" ;

sgplot data=Results noautolegend ;

format col_ready_Mean Pred_Mean Lower_Mean Upper_Mean 8.2;

refline .7 / axis=x;

refline ref / lineattrs=(thickness=18) transparency=0.9;

band y=School lower=Lower_Mean upper=Upper_Mean / transparency=0.6;

scatter y=School x=Pred_Mean / markerattrs=(symbol=circlefilled) transparency=0

xerrorlower=Lower_Mean xerrorupper=Upper_Mean ;

scatter y=School x=x4 / markerchar=N x2axis;

scatter y=School x=x3 / markerchar=Pred_Mean x2axis;

scatter y=School x=x2 / markerchar=Lower_Mean x2axis;

scatter y=School x=x1 / markerchar=Upper_Mean x2axis;

xaxis  display=(nolabel) grid offsetmin=0.1 offsetmax=0.32;

x2axis display=(noticks nolabel) offsetmin=0.75 offsetmax=0.05;

yaxis display=(nolabel noticks) offsetmin=0.05 offsetmax=0.05;

run;

1 ACCEPTED SOLUTION

Accepted Solutions
DanH_sas
SAS Super FREQ

Try this before your code and see if it works for you.

proc template;
define style styles.garamond;
parent=styles.listing; /* Or your favorite style */

style graphfonts from graphfonts / 
      'GraphDataFont' = ("Garamond, <MTsans-serif>",7pt)               
      'GraphUnicodeFont' = ("<MTsans-serif-unicode>",9pt)                  
      'GraphValueFont' = ("Garamond, <MTsans-serif>",9pt)              
      'GraphLabel2Font' = ("Garamond, <MTsans-serif>",10pt)            
      'GraphLabelFont' = ("Garamond, <MTsans-serif>",10pt)             
      'GraphFootnoteFont' = ("Garamond, <MTsans-serif>",10pt)          
      'GraphTitleFont' = ("Garamond, <MTsans-serif>",11pt,bold)        
      'GraphTitle1Font' = ("Garamond, <MTsans-serif>",14pt,bold)       
      'GraphAnnoFont' = ("Garamond, <MTsans-serif>",10pt);             
end;
run;

ods listing style=garamond;


View solution in original post

1 REPLY 1
DanH_sas
SAS Super FREQ

Try this before your code and see if it works for you.

proc template;
define style styles.garamond;
parent=styles.listing; /* Or your favorite style */

style graphfonts from graphfonts / 
      'GraphDataFont' = ("Garamond, <MTsans-serif>",7pt)               
      'GraphUnicodeFont' = ("<MTsans-serif-unicode>",9pt)                  
      'GraphValueFont' = ("Garamond, <MTsans-serif>",9pt)              
      'GraphLabel2Font' = ("Garamond, <MTsans-serif>",10pt)            
      'GraphLabelFont' = ("Garamond, <MTsans-serif>",10pt)             
      'GraphFootnoteFont' = ("Garamond, <MTsans-serif>",10pt)          
      'GraphTitleFont' = ("Garamond, <MTsans-serif>",11pt,bold)        
      'GraphTitle1Font' = ("Garamond, <MTsans-serif>",14pt,bold)       
      'GraphAnnoFont' = ("Garamond, <MTsans-serif>",10pt);             
end;
run;

ods listing style=garamond;


sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

How to Concatenate Values

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.

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
  • 1 reply
  • 10026 views
  • 2 likes
  • 2 in conversation