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.

hackathon24-white-horiz.png

The 2025 SAS Hackathon Kicks Off on June 11!

Watch the live Hackathon Kickoff to get all the essential information about the SAS Hackathon—including how to join, how to participate, and expert tips for success.

YouTube LinkedIn

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