Skip to content

Optimized Agg backend

Agg backend can be optimize with several matplotlib option. This can be useful for big data.

These are the option in the graph_generator_template.py. It can be set in the top of your code before you create your matplotlib figure.

#optimized draw on Agg backend
import matplotlib as mpl
mpl.rcParams['path.simplify'] = True
mpl.rcParams['path.simplify_threshold'] = 1.0
mpl.rcParams['agg.path.chunksize'] = 1000 #you can change this parameter for better result. See matplotlib docs

source: matplotlib.org/stable/users/explain/artists/performance.html