Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Matplotlib: Set the animation.rc parameter

Tags:

matplotlib

While plotting a large animation in Matplotlib, I received the warning:

Animation size has reached 20997590 bytes, exceeding the limit of 20971520.0. If you're sure you want a larger animation embedded, set the animation.embed_limit rc parameter to a larger value (in MB). This and further frames will be dropped.

Does anyone know how to set this parameter?

like image 322
duhaime Avatar asked Oct 12 '18 11:10

duhaime


People also ask

What are RC parameters matplotlib?

The matplotlibrc fileMatplotlib uses matplotlibrc configuration files to customize all kinds of properties, which we call 'rc settings' or 'rc parameters'.

Where is matplotlib RC?

matplotlib/matplotlib/rc or ~/. config/matplotlib/matplotlibrc . The rc configuration file is found under $INSTALL_DIR/matplotlib/mpl-data/matplotlibrc , where $INSTALL_DIR is where you installed Matplotlib, ... Get Matplotlib for Python Developers now with the O'Reilly learning platform.

How do I run an animation in matplotlib?

Animations in Matplotlib can be made by using the Animation class in two ways: By calling a function over and over: It uses a predefined function which when ran again and again creates an animation. By using fixed objects: Some animated artistic objects when combined with others yield an animation scene.

What is Blit in FuncAnimation?

blit=True means only re-draw the parts that have changed. anim = animation. FuncAnimation(fig, animate, init_func=init, frames=200, interval=20, blit=True) # save the animation as an mp4. This requires ffmpeg or mencoder to be # installed.


1 Answers

Aha:

import matplotlib
matplotlib.rcParams['animation.embed_limit'] = 2**128
like image 104
duhaime Avatar answered Sep 20 '22 16:09

duhaime