Pep8ify examples

This PR converts the animation, api and axes_grid examples.

(Retry of #3182/#3183)

I addressed @ianthomas23' comments from #3183
I'm not going to change this as I found occurrences of indexing expression in the matplotlib src where spaces around operators are both used (``type1font.py``) and not used (``tri/triinterpolate.py``).