Graphics Programming

Data visualization using SAS programming, including ODS Graphics and SAS/GRAPH. Charts, plots, maps, and more!
BookmarkSubscribeRSS Feed
RichardDeVen
Barite | Level 11

Is it possible to use SAS/Graph line or stroke fonts in SGPLOT ? I ask because I eventually want to use a custom font created with PROC GFONT.

 

This sample suggests no 😞

 

ods html file='plot.html';

proc sgplot data=sashelp.class;
  title "Scatter!";
  scatter x=age y=weight;
run;

proc sgplot data=sashelp.class;
  title f=Swiss "Scatter!";
  scatter x=age y=weight;
run;

proc gplot data=sashelp.class;
  title f=Swiss "Scatter!";
  plot weight * age;
run;

ods html close;

RichardADeVenezia_0-1604801179154.png

 

There is no PROC SGGFONT.

Might there be some trick to coerce SG* into using the old fonts (or a GFONT created font) ?  

 

 

1 REPLY 1
ballardw
Super User

This is a guess in part as I haven't found anything in the documentation. I think that the Font needs to be registered with the operating system and not just in SAS as the device SAS Graph fonts are.

 

One reason I think so is that the ODS graphics will work completely without SAS Graph installation (now).

I do note that the SAS fonts like SWISS are not available from the Windows OS point of view, not in the font selectors font settings window by default.

 

If you can install the font to the OS level I bet it will work. Not interested enough to try to pull SWISS to the system though.

sas-innovate-white.png

Our biggest data and AI event of the year.

Don’t miss the livestream kicking off May 7. It’s free. It’s easy. And it’s the best seat in the house.

Join us virtually with our complimentary SAS Innovate Digital Pass. Watch live or on-demand in multiple languages, with translations available to help you get the most out of every session.

 

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 1 reply
  • 642 views
  • 0 likes
  • 2 in conversation