chiark / gitweb /
m.plots: matplotlib uses X by default?!
authorVladimír Vondruš <mosra@centrum.cz>
Wed, 16 May 2018 09:13:25 +0000 (11:13 +0200)
committerVladimír Vondruš <mosra@centrum.cz>
Wed, 16 May 2018 10:20:49 +0000 (12:20 +0200)
pelican-plugins/m/plots.py

index e724a7a37a834f9a4d3456a6015914e72f53f025..dc809e02dbbe435e594f7975f3cecf604236364a 100644 (file)
@@ -30,6 +30,7 @@ from docutils.parsers.rst import directives
 from docutils.parsers.rst.roles import set_classes
 
 import matplotlib as mpl
+mpl.use('Agg') # otherwise it will attempt to use X11
 import matplotlib.pyplot as plt
 import numpy as np
 import io