From ac668f0a1af7e487c9b95417f0ae2d1a928f152d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Soko=C5=82owski?= Date: Fri, 24 Aug 2018 18:03:40 -0400 Subject: [PATCH] allow script to run on a headless server without $DISPLAY --- appfigures.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/appfigures.py b/appfigures.py index a480b0c..864864c 100755 --- a/appfigures.py +++ b/appfigures.py @@ -54,6 +54,10 @@ def getUpdatesDaily(t): def plotData(filename, ylabel, timespan, x, y): + # allow this to run on a headless server + import matplotlib + matplotlib.use("Agg") + import matplotlib.pyplot as plt import matplotlib.dates as mdates