From 0e0980d09a0aac2f93d0df4a0338025ae98ab175 Mon Sep 17 00:00:00 2001 From: "W. Trevor King" Date: Wed, 20 Oct 2010 03:10:51 -0400 Subject: [PATCH] Reposition matplotlib.use() call in velocity_dependant_scan.py. This fixes: .../matplotlib/__init__.py:833: UserWarning: This call to matplotlib.use() has no effect because the the backend has already been chosen; matplotlib.use() must be called *before* pylab, matplotlib.pyplot, or matplotlib.backends is imported for the first time. --- pysawsim/velocity_dependant_scan.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pysawsim/velocity_dependant_scan.py b/pysawsim/velocity_dependant_scan.py index 72b4d07..c54cf29 100644 --- a/pysawsim/velocity_dependant_scan.py +++ b/pysawsim/velocity_dependant_scan.py @@ -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. -- 2.26.2