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;
ods printer file='C:\Users\lindsey.nelson\myMap.gif';
You needed to give it an actual file name, such as gif.
ods printer file='C:\Users\lindsey.nelson\myMap.gif';
You needed to give it an actual file name, such as gif.
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!
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.