Pep8ify examples

This PR converts the animation, api and axes_grid examples.

(Retry of #3182/#3183)

I addressed @ianthomas23' comments from #3183
I can't find a the place in the pep8 document where it requires a newline between class and __init__. The pep8 tool does not require a newline, it was added by autopep8 though.