BookmarkSubscribeRSS Feed
☑ This topic is solved. Need further help from the community? Please sign in and ask a new question.
acordes
Rhodochrosite | Level 12

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;

 

 

 

pic.png

1 ACCEPTED SOLUTION

Accepted Solutions
ballardw
Super User

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;

View solution in original post

2 REPLIES 2
acordes
Rhodochrosite | Level 12

Everything ok. 

I had to open it in a browser to see it animated. 🙂

ballardw
Super User

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;

SAS Innovate 2025: Register Now

Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
Register now!

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
  • 796 views
  • 2 likes
  • 2 in conversation