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;
Registration is open! SAS is returning to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team. Register for just $495 by 12/31/2023.
If you are interested in speaking, there is still time to submit a session idea. More details are posted on the website.
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.