From f54c64aa8713b19b0cb31353ffa0008dfc10c413 Mon Sep 17 00:00:00 2001 From: Marcel Loose <loose@astron.nl> Date: Thu, 22 Mar 2012 09:55:06 +0000 Subject: [PATCH] Task #2699: import of recent pylab fails when X is not availble (sigh!). Moved import of pylab into the function that really needs it. --- CEP/GSM/src/gsmutils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CEP/GSM/src/gsmutils.py b/CEP/GSM/src/gsmutils.py index b83c135b4bd..604cb87dac3 100644 --- a/CEP/GSM/src/gsmutils.py +++ b/CEP/GSM/src/gsmutils.py @@ -6,7 +6,6 @@ # ------------------------------------------------------------------------------ import sys, string -import pylab import numpy as np import monetdb.sql as db import logging @@ -456,6 +455,7 @@ SELECT t0.v_catsrcid cursor.close() def plotSpectrum(x, y, p, f): + import pylab expflux = "Exp. flux: " + str(round(10**p(0),3)) + " Jy" fig = pylab.figure() ax = fig.add_subplot(111) -- GitLab