Merge branch 'dfsg-orig'
[debian/gnuradio] / gr-utils / src / python / gr_plot_psd.py
index 669d7b573a4e0b6cfe5e0b0a8c98dadf41c26171..0e3dbecd944f583d126364d76f215f244063d57d 100755 (executable)
 # Boston, MA 02110-1301, USA.
 # 
 
-try:
-    import matplotlib
-    matplotlib.use('TkAgg')
-    matplotlib.interactive(True)
-except ImportError:
-    print "Please install Matplotlib to run this script (http://matplotlib.sourceforge.net/)"
-    raise SystemExit, 1
-
 try:
     import scipy
     from scipy import fftpack
@@ -187,8 +179,9 @@ class gr_plot_psd:
         draw()
         
     def zoom(self, event):
-        newxlim = self.sp_iq.get_xlim()
-        if(newxlim.all() != self.xlim.all()):
+        newxlim = scipy.array(self.sp_iq.get_xlim())
+        curxlim = scipy.array(self.xlim)
+        if(newxlim.all() != curxlim.all()):
             self.xlim = newxlim
             xmin = max(0, int(ceil(self.sample_rate*(self.xlim[0] - self.position))))
             xmax = min(int(ceil(self.sample_rate*(self.xlim[1] - self.position))), len(self.iq))