BookmarkSubscribeRSS Feed
ckx
Quartz | Level 8 ckx
Quartz | Level 8

I've found some very useful instructions by Rick Wicklin on how to create a spaghetti plot as an animated GIF at https://blogs.sas.com/content/iml/2016/08/22/animation-by-statement-proc-sgplot.html. But I need to create quite a number of such animated spaghetti plots so I'd like to include the animated GIF in a powerpoint file.Has anybody got that to work?

 

I've tried replacing "ODS HTML" in Rick's example by "ODS POWERPOINT" but that produces an empty powerpoint file. If I don't use "ods powerpoint select none", I get a powerpoint slide per by-group (but still no animated gif).Any suggestions?

5 REPLIES 5
Duggins
Obsidian | Level 7

To my knowledge, you cannot replace the destination with POWERPOINT because using the destinations Rick includes are what creates the gif. I teach students how to make gifs and embed them in powerpoints all the time, but I've never found a way to directly place the gif into a slide. Of course, I'm not saying it is impossible - someone who knows ODS much better than me might have a suggestion, but I'd be surprised if there were a SAS-native way to do it because of how the PRINTER destination is creating the gif separate from any other ODS destination. 

To me, this is similar to the fact that if I create a graphic with ODS LISTING and ODS POWERPOINT turned on, I'm not inserting the png into the powerpoint file - I'm creating the two separate files. I'm just not aware of the POWERPOINT destination having any support for creating gifs the way it does for other graphics formats. 

Reeza
Super User
You need to separate these steps. Create the GIF and then insert it into the powerPoint as a second step. I've for sure done the first step many times. I haven't done the second but can't imagine it's any different than adding a standard image.

Note that you do need a 'newer' version of PowerPoint to have it support GIFs.
ckx
Quartz | Level 8 ckx
Quartz | Level 8

Thanks both for the helpful answers. For now, I'm wondering whether a powerpoint file would have added value or whether a set of animated GIFs might be just as useful. But Reeza's answer does clarify why it won't work in a single step and how to proceed if I do want a powerpoint file.

Reeza
Super User
Not sure what you're doing, but an HTML file does a better job with animated GIFS and you can add controls to stop/restart GIF as well as click for different animations more easily. Though I do all of that via HTML, not SAS.
ckx
Quartz | Level 8 ckx
Quartz | Level 8

Using the "large icons" option in Windows 10 File Explorer, you get a thumbnail of the GIF (without animation). Double clicking opens the GIF in "Microsoft Photos" (at least on my machine). Pressing right arrow moves to the next chart, left arrow to the previous -- I think that will suffice. But I'm still working on the GIFs, haven't shared them yet so I may need to try other options at some point

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 5 replies
  • 730 views
  • 0 likes
  • 3 in conversation