The output window shows the sequence of my macro loop but my gif only contains one frame.
ods graphics / imagefmt=GIF width=12cm height=10cm ;
options papersize=('8 in', '6 in')
nodate nonumber
/* do not show date, time, or frame number */
animduration=0.2 animloop=yes NOANIMOVERLAY NOBYLINE /* animation details */
printerpath=gif animation=start; /* start recording images to GIF */
ods printer file='/caslibs/reportspr/Anim3.gif' NOGTITLE DPI=300; /* images saved into animated GIF */
%macro create(_rot);
%do i=&_rot %to 135 %by 10;
proc g3d data=RISKNOBA.SCORED;
where _RMCTMAIMG='6C122V' and byear=2021;
plot _o_actual_mileage*meses_efectivos=P_it_based_sales_res /grid ctop=red cbottom=blue caxis=black rotate=&i tilt=30 xticknum=8 yticknum=8 ;
run;
quit;
%end;
%mend create;
%create(45);
options printerpath=gif animation=stop; /* stop recording images */
ods printer close;
Instead of running the proc multiple times you might try using a list of angles in the ROTATE option and see if you can skip the macro completely .
The TILT also accepts a similar list or range of values.
proc g3d data=RISKNOBA.SCORED;
where _RMCTMAIMG='6C122V' and byear=2021;
plot _o_actual_mileage*meses_efectivos=P_it_based_sales_res /
grid ctop=red cbottom=blue caxis=black
rotate=(45 to 135 by 10)
tilt=30 xticknum=8 yticknum=8 ;
run;
quit;
Everything ok.
I had to open it in a browser to see it animated. 🙂
Instead of running the proc multiple times you might try using a list of angles in the ROTATE option and see if you can skip the macro completely .
The TILT also accepts a similar list or range of values.
proc g3d data=RISKNOBA.SCORED;
where _RMCTMAIMG='6C122V' and byear=2021;
plot _o_actual_mileage*meses_efectivos=P_it_based_sales_res /
grid ctop=red cbottom=blue caxis=black
rotate=(45 to 135 by 10)
tilt=30 xticknum=8 yticknum=8 ;
run;
quit;
April 27 – 30 | Gaylord Texan | Grapevine, Texas
Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and save with the early bird rate—just $795!
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.
Ready to level-up your skills? Choose your own adventure.