summaryrefslogtreecommitdiff
path: root/gr-wxgui/src/python/plotter/channel_plotter.py
diff options
context:
space:
mode:
authorBen Reynwar <ben@reynwar.net>2012-06-25 08:09:05 -0700
committerBen Reynwar <ben@reynwar.net>2012-06-25 08:09:05 -0700
commit1f57cf3fee8ded4d58e77bef8ffd8d8ce4aca53c (patch)
tree795a34e4599a88a80040d27dcb2b342e4c705bea /gr-wxgui/src/python/plotter/channel_plotter.py
parentfd3abfe06ef4f574122d2d2a08b716db8c2b776d (diff)
parent881010202a5054c430d8e5a6f72c206c1cc350ae (diff)
Merge branch 'next' of http://gnuradio.org/git/gnuradio into next
Diffstat (limited to 'gr-wxgui/src/python/plotter/channel_plotter.py')
-rw-r--r--gr-wxgui/src/python/plotter/channel_plotter.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/gr-wxgui/src/python/plotter/channel_plotter.py b/gr-wxgui/src/python/plotter/channel_plotter.py
index a3a2b64519..4bcc36fd4c 100644
--- a/gr-wxgui/src/python/plotter/channel_plotter.py
+++ b/gr-wxgui/src/python/plotter/channel_plotter.py
@@ -56,6 +56,7 @@ class channel_plotter(grid_plotter_base):
self._channels = dict()
#init channel plotter
self.register_init(self._init_channel_plotter)
+ self.callback = None
def _init_channel_plotter(self):
"""
@@ -150,6 +151,13 @@ class channel_plotter(grid_plotter_base):
label_str += '\n%s: %s'%(channel, common.eng_format(y_value, self.y_units))
return label_str
+ def _call_callback (self, x_val, y_val):
+ if self.callback != None:
+ self.callback(x_val, y_val)
+
+ def set_callback (self, callback):
+ self.callback = callback
+
def _draw_legend(self):
"""
Draw the legend in the upper right corner.