

There is also a procedural "pylab" interface based on a state machine (like OpenGL), designed to closely resemble that of MATLAB, though its use is discouraged. It provides an object-oriented API for embedding plots into applications using general-purpose GUI toolkits like Tkinter, wxPython, Qt, or GTK. Note that by default, errors thrown by ImageMagick will not reach you, apart from a nonzero return code.Matplotlib is a plotting library for the Python programming language and its numerical mathematics extension NumPy. Your_animation.save('location.gif', writer=writer)

Plt.rcParams = '/magick.exe'Įxport your animation! ( mpl docs on ImageMagickFileWriter) writer = ImageMagickFileWriter()

Point matplotlib to the install dir of ImageMagick: ( mpl docs on rcParams) import matplotlib.pyplot as plt When on windows, remember to log off and back on) Set an environment variable MAGICK_HOME pointing to the '\modules\coders' folder (see the docs.Animated gif is at least one of the animation options offered by the ImageMagickWriter, but there may be more. I'll leave this post for future reference.Īs for the specifics when setting up this environment on a cluster, you'll have to translate each step for the specific needs for your server I guess. It's not rocket science, but still somewhat of a hassle to set up the first time around. This old post popped up while I was struggling to get some matplotlib animations exported as an animated gif.
