allow script to run on a headless server without $DISPLAY

This commit is contained in:
Jakub Sokołowski 2018-08-24 18:03:40 -04:00
parent 1b19806d05
commit ac668f0a1a
No known key found for this signature in database
GPG Key ID: 4EF064D0E6D63020
1 changed files with 4 additions and 0 deletions

View File

@ -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