Advanced animations
So far, we have seen how to inject animations into an existing Matplotlib application as if it was an afterthought. This is perfectly valid, but what if we spend time considering how best to prepare our codebase for animation use? What sort of features and effects could we enable?
Your manager drops by and says, "You know the animation I showed the Bobs the other day? They need one with the tracks displayed, mmm-kay? We need to push this, so I am going to need you to come in on Saturday to get this done, that would be great." It is a good thing we had the foresight to isolate our display elements into their own classes in the previous chapter. Now, it is just a matter of adding a new display element, that is, tracks! We will model this one closely to the Stormcells
design, but there are going to be some fundamental differences. First, the storm cells are organized by frames while the tracks are not. This leads to a bit of a complication for the purposes of animations...