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

When using unicode in a graph label, I am losing the effect of weight=bold and the font is not what I expect.  This may just apply to ODS RTF (which I'm not sure).  See this sample code:

 

ods rtf file = "H:\Figure.rtf";
ods graphics on / imagename="Figure";

title ;
footnote ;
proc sgplot data=sashelp.baseball;
scatter x=logsalary y=crhome/group=league;
xaxis label="Log(*ESC*){unicode '2081'x}(*ESC*){unicode '2080'x} Salary" 
type=log logstyle=logexpand labelattrs=(weight=bold family='arial');
yaxis label="Home Runs" labelattrs=(weight=bold family='arial');
keylegend;
;
run;
ods graphics off;
ods rtf close;

 

unicode_graph.png

The y-axis label is the correct font, is bold, and is vector quality.  The x-axis, using unicode, is not preserving any of those attributes (though it is hard to tell if the font is correct- it looks the same using family='arial unicode ms') .

 

On a related note, my figure legend is not vector quality, with or without unicode.

 

Are there any known solutions?

1 ACCEPTED SOLUTION

Accepted Solutions
DanH_sas
SAS Super FREQ

How does it look if you set the OUTPUTFMT=PNG?

 

ods graphics on / imagename="Figure" outputfmt=png;

View solution in original post

3 REPLIES 3
DanH_sas
SAS Super FREQ

How does it look if you set the OUTPUTFMT=PNG?

 

ods graphics on / imagename="Figure" outputfmt=png;
bmjepson
Fluorite | Level 6

It cleaned up the vector quality issue, bold and font, but I lost the subscripts from the unicode.

 

figure2.png

bmjepson
Fluorite | Level 6

This solution worked perfectly. Thanks Dan!

sas-innovate-2026-white.png



April 27 – 30 | Gaylord Texan | Grapevine, Texas

Registration is open

Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!

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