Data visualization with SAS programming

How Can I Import SAS Vector Graphics into MS Word with Italics in Annotations in University Edition?

Reply
Occasional Contributor
Posts: 15

How Can I Import SAS Vector Graphics into MS Word with Italics in Annotations in University Edition?

I’m using ODS graphics in SAS University Edition under Windows 10 to prepare figures for a journal article. I’m annotating some of the figures (with SG Annotation), and I would like to use italics in some of the annotations. But, so far, I’ve been unable to get this to work with vector graphics.

 

The attached program illustrates the problem.

 

Is there a way to import vector graphics from SAS University Edition into Word with italics in annotations?

 

Thank you for your help,

 

Don Macnaughton

Attachment
Grand Advisor
Posts: 16,925

Re: How Can I Import SAS Vector Graphics into MS Word with Italics in Annotations in University Edit

Have you tried SVG with ODS RTF?

Grand Advisor
Posts: 16,925

Re: How Can I Import SAS Vector Graphics into MS Word with Italics in Annotations in University Edit

So, SVG is not an option with RTF. 

For RTF the valid options are:

 

EMF (default), PNG, JPEG, JPG, JFIF

 

The PNG didn't seem bad to me when embedded and it did keep the italics. I didn't try all the options, but you can play around. I do know that there are some issues with using the Arial font families, if you search on here you'll find a post that details the issues (from Cynthia Zender).

 

Here's the doc link that states the type vs ODS output.  I use ODS RTF statements because then I can control the file name and other things if necessary.  This also means I can navigate to the myfolders, set up during installation, to see my files. No need to 'download' files anywhere. 

 

ods rtf file='/folders/myfolders/output.rtf';
ods graphics / imagefmt=png; 
ods escapechar='@';

%sganno;

data anno;
%sgtext(label="Here's some italic text with a subscript:", 
		textsize=14, textfont="Times New Roman", 
		x1=20, Y1=50,
      anchor="LEFT", width=70);
%sgtextcont(label=" b@{sub 'i'}", textstyle="ITALIC");
run;

data _one_;
input x y;
datalines;
1 2
3 4
;

proc sgplot sganno=anno;
  scatter x=x y=y;
  run;

ods rtf close;

I'm sure some of the SAS guys will comment, and probably have the correct answer but wanted to give you some options until they come along and correct me once again Smiley Wink

Ask a Question
Discussion stats
  • 2 replies
  • 95 views
  • 0 likes
  • 2 in conversation