1/^class Animation/i 2 3import matplotlib.pyplot as plt 4class BackendError(RuntimeError): 5 pass 6 7. 8/self\._blit = blit/i 9 if blit and plt.get_backend().lower() == 'macosx': 10 raise BackendError('''The current backend is 'MacOSX' 11and may go into an infinite loop with blit turned on. Either 12turn off blit or use an alternate backend, for example, like 13'TKAgg', using the following prepended to your source code: 14 15import matplotlib 16matplotlib.use('TKAgg') 17''') 18. 19w 20