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

In 9.4 I can use HEADERATTRS option but I want to change the font size using SAS 9.3 that does not support that option.  Can I do the same another way?

proc sgpanel data=sashelp.class;

   panelby age / layout=rowlattice rowheaderpos=right headerattrs=(size=18pt);

   series x=weight y=height;

   run;

1 ACCEPTED SOLUTION

Accepted Solutions
Jay54
Meteorite | Level 14

Here is one work around.  Cell headers use the GraphValueFont attribute for rendering.  This is also used by things like axis tick values, and maybe other things like legend values, etc..  You can derive a font, and change this attribute in GraphFonts.  Then, you can set the axis values back to the smaller font by using the ValueAttrs on the axis. 

proc template;                                                               

   define style Styles.Fonts;                                              

      parent = styles.listing;

      class GraphFonts                                                       

         "Fonts used in graph styles" /                                                   

         'GraphValueFont' = ("<sans-serif>, <MTsans-serif>",12pt)                   

      ;

  end;                                                                      

run;

ods html style=Styles.Fonts;

proc sgpanel data=sashelp.class;

  panelby sex;

  vbar age;

  colaxis valueattrs=(size=8);

  rowaxis valueattrs=(size=8);

run;

View solution in original post

3 REPLIES 3
Jay54
Meteorite | Level 14

Here is one work around.  Cell headers use the GraphValueFont attribute for rendering.  This is also used by things like axis tick values, and maybe other things like legend values, etc..  You can derive a font, and change this attribute in GraphFonts.  Then, you can set the axis values back to the smaller font by using the ValueAttrs on the axis. 

proc template;                                                               

   define style Styles.Fonts;                                              

      parent = styles.listing;

      class GraphFonts                                                       

         "Fonts used in graph styles" /                                                   

         'GraphValueFont' = ("<sans-serif>, <MTsans-serif>",12pt)                   

      ;

  end;                                                                      

run;

ods html style=Styles.Fonts;

proc sgpanel data=sashelp.class;

  panelby sex;

  vbar age;

  colaxis valueattrs=(size=8);

  rowaxis valueattrs=(size=8);

run;

data_null__
Jade | Level 19

Thank you.  My Spaghetti Plots are beautiful.

Is the "connection" between GraphValueFont and the Cell Header documented somewhere?

Jay54
Meteorite | Level 14

Some of such doc is available in the "GRL Users' Guide" book in the SAS doc in the Appendix.  Look under "Graph Style Elements used by ODS Graphics".

Can you share a picture of your Spaghetti plot?  Just curious.

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
  • 3 replies
  • 4769 views
  • 0 likes
  • 2 in conversation