small improvements to graph animation code