diff --git a/embody_plot.py b/embody_plot.py
index 38a3ade3e44df7abb1738f4032ac9d6462f590c3..bc0c8a159c1ba8f1080fd64e5c47ff0d59a18db0 100644
--- a/embody_plot.py
+++ b/embody_plot.py
@@ -30,6 +30,10 @@ import argparse
 
 import numpy as np
 import scipy.ndimage as ndimage
+
+import matplotlib
+matplotlib.use('agg')
+
 import matplotlib.pyplot as plt
 import matplotlib.image as mpimg
 from matplotlib.backends.backend_agg import FigureCanvasAgg as FigureCanvas