x 'cd F:\SAS_Output';
/*--This program requires SAS 9.4--*/
%macro animate(start=, end=, incr=);
%do year=&start %to &end %by &incr;
proc sgplot data=DM_ noautolegend;
footnote j=l 'Created using the SGPLOT Procedure';
where yearnum=&year;
bubble x=ethnic y=AGE size=race / group=country
datalabel=SEX datalabelattrs=(size=12 weight=bold) dataskin=gloss
bradiusmin=2 bradiusmax=50;
inset "&year" / position=bottomright textattrs=(size=60 weight=bold color=lightgray);
xaxis type=log offsetmin=0.05 offsetmax=0.08 logstyle=linear grid min=100 max=60000;
yaxis offsetmin=0.05 offsetmax=0.05 grid min=30 max=90;
run;
%end;
%mend animate;
data DM_;
set dscproj.dm;
where age ne .;
yearnum=input(substr(brthdtc,1,4),4.);
run;
/*--Create animation--*/
options papersize=('5 in', '3 in') printerpath=gif animation=start animduration=0.1 animloop=yes noanimoverlay;
ods printer file='DM.gif';
ods graphics / width=5in height=3in imagefmt=GIF;
%animate(start=1950, end=1984, incr=2);
%animate(start=1984, end=1950, incr=-2);
options printerpath=gif animation=stop;
ods printer close;
I am trying to output the gif to a certain folder and I get the following warning:
WARNING: RTF destination does not support GIF images. Using the
default static format.
WARNING: SIZE=RACE is invalid. The column has the wrong data
type.
WARNING: SIZE=RACE is invalid. The column has the wrong data
type.
WARNING: SIZE=RACE is invalid. The column has the wrong data
type.
WARNING: SIZE=RACE is invalid. The column has the wrong data
type.