Reposition matplotlib.use() call in velocity_dependant_scan.py.
[sawsim.git] / pysawsim / velocity_dependant_scan.py
index 72b4d07171d8307571906e8f075c5b877433da3c..c54cf29d9f5be6ccbe0db28ce5fd528276e59af8 100644 (file)
@@ -24,6 +24,7 @@ import shutil
 import sys
 
 import matplotlib
+matplotlib.use('Agg')  # select backend that doesn't require X Windows
 import numpy
 import pylab
 from scipy.optimize import leastsq
@@ -34,7 +35,6 @@ from .manager import MANAGERS, get_manager
 from . import sawsim_histogram
 
 
-matplotlib.use('Agg')  # select backend that doesn't require X Windows
 FIGURE = pylab.figure()  # avoid memory problems.
 """`pylab` keeps internal references to all created figures, so share
 a single instance.