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

Hello,

I am trying to create a GIF animation in SAS studio 3.8. However, I keep getting the warning:

 WARNING: RTF destination does not support GIF images. Using the 
          default static format.

Due to this, I am only producing the individual graphs and not the GIF. Here is my code that came from an example on SAS Blogs:

ods html;
data stocks;
   set sashelp.stocks;
   Month = month(date);      /* 1, 2, 3, ..., 12 */
   Year = year(date);        /* 1986, 1987, ..., 2005 */
run;
 
proc sort data=stocks; by date; run;

ods graphics / imagefmt=GIF width=4in height=3in;     /* each image is 4in x 3in GIF */
options papersize=('4 in', '3 in')                    /* set size for images */
        nodate nonumber                               /* do not show date, time, or frame number */
        animduration=0.5 animloop=yes noanimoverlay   /* animation details */
        printerpath=gif animation=start;              /* start recording images to GIF */
ods printer file='C:\Users\lindsey.nelson\Gifs';  /* images saved into animated GIF */
 
ods html select none;                                /* suppress screen output */
proc sgplot data=stocks;
title "Stock Performance";
   by year;                                           /* create 20 images, one for each year */
   series x=month y=close / group=stock;              /* each image is a time series */
   xaxis integer values=(1 to 12);                         
   yaxis min=10 max=210 grid;                         /* set common vertical scale for all graphs */
run;
ods html select all;    
ods listing;                              /* restore screen output */
 
options printerpath=gif animation=stop;               /* stop recording images */
ods printer close; 
ods html close;     

 

1 ACCEPTED SOLUTION

Accepted Solutions
Reeza
Super User
ods printer file='C:\Users\lindsey.nelson\myMap.gif';

You needed to give it an actual file name, such as gif.

View solution in original post

2 REPLIES 2
Reeza
Super User
Show the log.

Turn off ODS RTF as indicated in the other post:

ODS RTF CLOSE; *put at top of program;
Reeza
Super User
ods printer file='C:\Users\lindsey.nelson\myMap.gif';

You needed to give it an actual file name, such as gif.

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

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