02-06-2014 10:22 AM
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?
02-06-2014 10:28 AM
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
02-06-2014 10:38 AM
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..
02-06-2014 11:05 AM
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.
02-10-2014 05:35 PM
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.
02-10-2014 06:32 PM
Did you create the graph using GPLOT or GTL? If GTL, you can use the RangeAttributeMap such that it will be consistent for all the values across all the time steps. This is what I alluded to in my earlier reply.
02-10-2014 06:40 PM
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.