I have count data for an X-Y coordinate system over time. I would like to display it using a heat map that is an animated gif file where the animation scrolls thru the time axes.
I found this example (as well as a bunch of others):
But I have been unable to get it to produce an animated GIF.
Is this even possible?
And if so, any suggestions on how to make it work?
If not, any other suggested approaches to do this?
I guess this is a 2-part question.
For the first part, exactly what would you like your "heat map" to look like? Could you show an example?
For the 2nd part (animation), here are several examples:
Also note that in 9.4, the syntax for creating gif animations was made simpler ... so if you've got 9.4, then you can take advantage of that
See my blog article on gif animatiion using SGPLOT. You can use GTL and SGRENDER for the graphics part for heatmap. The animation code will be similar.
Note, to keep the color mappings constant through the animation, I suggest using the RangeAttrMap to control the mapping of color to response values..
Thanks Robert and Sanjay. These look like they will do exactly what I want.
And Rob, I do have 9.4 and so I can take advantage of the simpler syntax. In looking at both of your responses I recognize that my attempts did not work as I was using Jurassic SAS/Graph options to try and do this.
I have a fair amount of data management work to do before I have the data for this. Now that I know I can do an animated heat map the structure of the output data set will likely be tweaked a bit.
I will post an example of the output once I have gotten things working.
Thanks to both of you for your incredibly helpful and quick responses.
Hope you don't mind another question. Using the template code from the line in my original question, and with the changes you both suggested, I now am able to produce an animated gif (attached). It got it to work both with a by variable as well as via macro looping.
This is geospatial (latitude X longitude buckets) over time. Latitude and Longitude are the x,y coordinates and time is the by variable. I would like to have the same colorresponse shown regardless of the by group. But I can't see how to do that.
Is it possible to do that? And if so, can you point me in the right direction?
PS, in the editor, the animation of the gif file is used. But once the message was posted it was gone. If you want to see the animation you have to right click and open in new window.
I used GTL and I think I must have confused RangeAttributeMap with another option as what I looked at appeared to be for discrete values instead of continuous ones. I found the doc for RangeAttributeMap and it looks like it will do what I need.
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.