summaryrefslogtreecommitdiff
path: root/gr-utils/src
diff options
context:
space:
mode:
Diffstat (limited to 'gr-utils/src')
-rwxr-xr-xgr-utils/src/python/gr_plot_const.py8
-rwxr-xr-xgr-utils/src/python/gr_plot_fft.py13
-rwxr-xr-xgr-utils/src/python/gr_plot_iq.py7
-rwxr-xr-xgr-utils/src/python/gr_plot_psd.py13
-rw-r--r--gr-utils/src/python/plot_data.py3
5 files changed, 11 insertions, 33 deletions
diff --git a/gr-utils/src/python/gr_plot_const.py b/gr-utils/src/python/gr_plot_const.py
index 355309955..ec2272c74 100755
--- a/gr-utils/src/python/gr_plot_const.py
+++ b/gr-utils/src/python/gr_plot_const.py
@@ -35,9 +35,6 @@ except ImportError:
from optparse import OptionParser
-matplotlib.interactive(True)
-matplotlib.use('TkAgg')
-
class draw_constellation:
def __init__(self, filename, options):
self.hfile = open(filename, "r")
@@ -139,8 +136,9 @@ class draw_constellation:
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
r = self.reals[int(ceil(self.xlim[0])) : int(ceil(self.xlim[1]))]
i = self.imags[int(ceil(self.xlim[0])) : int(ceil(self.xlim[1]))]
diff --git a/gr-utils/src/python/gr_plot_fft.py b/gr-utils/src/python/gr_plot_fft.py
index 59a3f286b..a9c1417f9 100755
--- a/gr-utils/src/python/gr_plot_fft.py
+++ b/gr-utils/src/python/gr_plot_fft.py
@@ -21,14 +21,6 @@
#
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
except ImportError:
@@ -164,8 +156,9 @@ class gr_plot_fft:
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))
diff --git a/gr-utils/src/python/gr_plot_iq.py b/gr-utils/src/python/gr_plot_iq.py
index 2a4142a81..371ce3b79 100755
--- a/gr-utils/src/python/gr_plot_iq.py
+++ b/gr-utils/src/python/gr_plot_iq.py
@@ -34,10 +34,7 @@ except ImportError:
from optparse import OptionParser
-matplotlib.interactive(True)
-matplotlib.use('TkAgg')
-
-class draw_fft:
+class draw_iq:
def __init__(self, filename, options):
self.hfile = open(filename, "r")
self.block_length = options.block
@@ -168,7 +165,7 @@ def main():
raise SystemExit, 1
filename = args[0]
- dc = draw_fft(filename, options)
+ dc = draw_iq(filename, options)
if __name__ == "__main__":
try:
diff --git a/gr-utils/src/python/gr_plot_psd.py b/gr-utils/src/python/gr_plot_psd.py
index 669d7b573..0e3dbecd9 100755
--- a/gr-utils/src/python/gr_plot_psd.py
+++ b/gr-utils/src/python/gr_plot_psd.py
@@ -21,14 +21,6 @@
#
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
except ImportError:
@@ -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))
diff --git a/gr-utils/src/python/plot_data.py b/gr-utils/src/python/plot_data.py
index 7c79e1714..08cdd6030 100644
--- a/gr-utils/src/python/plot_data.py
+++ b/gr-utils/src/python/plot_data.py
@@ -33,9 +33,6 @@ except ImportError:
from optparse import OptionParser
-matplotlib.interactive(True)
-matplotlib.use('TkAgg')
-
class plot_data:
def __init__(self, datatype, filenames, options):
self.hfile = list()