[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Commit-gnuradio] [gnuradio] 02/10: ctrlport: gr-perf-monitorx - don't s
From: |
git |
Subject: |
[Commit-gnuradio] [gnuradio] 02/10: ctrlport: gr-perf-monitorx - don't stash the canvas, ask the figure. |
Date: |
Sun, 27 Mar 2016 13:57:56 +0000 (UTC) |
This is an automated email from the git hooks/post-receive script.
jcorgan pushed a commit to branch maint
in repository gnuradio.
commit 95c2afab85b75df1b07a66187d7cf0b81c7d8e18
Author: Tom Rondeau <address@hidden>
Date: Wed Mar 9 17:23:43 2016 -0500
ctrlport: gr-perf-monitorx - don't stash the canvas, ask the figure.
---
.../python/gnuradio/ctrlport/gr-perf-monitorx | 20 ++++++++------------
1 file changed, 8 insertions(+), 12 deletions(-)
diff --git a/gnuradio-runtime/python/gnuradio/ctrlport/gr-perf-monitorx
b/gnuradio-runtime/python/gnuradio/ctrlport/gr-perf-monitorx
index 4fd09dc..d22e6e1 100644
--- a/gnuradio-runtime/python/gnuradio/ctrlport/gr-perf-monitorx
+++ b/gnuradio-runtime/python/gnuradio/ctrlport/gr-perf-monitorx
@@ -326,13 +326,12 @@ class DataTable(QtGui.QWidget):
self.sp = self.f.add_subplot(111)
self.sp.autoscale_view(True,True,True)
self.sp.set_autoscale_on(True)
- self.canvas = FigureCanvas(self.f)
# set up tabs
self.tabber = QtGui.QTabWidget();
self.layout.addWidget(self.tabber);
self.tabber.addTab(self.perfTable,"Table View");
- self.tabber.addTab(self.canvas, "Graph View");
+ self.tabber.addTab(self.f.canvas, "Graph View");
# set up timer
self.timer = QtCore.QTimer()
@@ -418,7 +417,7 @@ class DataTableBuffers(DataTable):
for r,w in zip(self.disp, sorted_fullness):
r.set_height(w[1])
- self.canvas.draw()
+ self.f.canvas.draw()
class DataTableRuntimes(DataTable):
def __init__(self, radioclient, G):
@@ -439,7 +438,7 @@ class DataTableRuntimes(DataTable):
total_work = 1
work_times = dict(zip(
map(lambda x: x.split("::")[0], wrk_knobs.keys()),
- map(lambda x: x.value/total_work, wrk_knobs.values())))
+ map(lambda x: 1e-10 + x.value/total_work, wrk_knobs.values())))
# update table view
if(self.perfTable.isVisible()):
@@ -457,7 +456,6 @@ class DataTableRuntimes(DataTable):
else:
sorted_work = work_times.items()
- f = plt.figure(self.f.number)
if(not self.disp):
self.disp = self.sp.bar(range(0,len(sorted_work)),
map(lambda x: x[1], sorted_work),
@@ -472,7 +470,7 @@ class DataTableRuntimes(DataTable):
for r,w in zip(self.disp, sorted_work):
r.set_height(w[1])
- self.canvas.draw()
+ self.f.canvas.draw()
class MForm(QtGui.QWidget):
def update(self):
@@ -791,8 +789,7 @@ class MForm(QtGui.QWidget):
self.sp.autoscale_view(True,True,True);
self.sp.set_autoscale_on(True)
- self.canvas = FigureCanvas(self.f)
- self.layout.addWidget(self.canvas);
+ self.layout.addWidget(self.f.canvas);
self.pos = graphviz_layout(self.G);
#self.pos = pygraphviz_layout(self.G);
@@ -856,7 +853,7 @@ class MForm(QtGui.QWidget):
def drawGraph(self):
self.do_update = True
- self.canvas.updateGeometry()
+ self.f.canvas.updateGeometry()
self.sp.clear()
plt.figure(self.f.number)
plt.subplot(111)
@@ -873,8 +870,7 @@ class MForm(QtGui.QWidget):
nx.draw_networkx_labels(self.G, self.pos,
font_size=12)
- self.canvas.draw()
- self.canvas.show()
+ self.f.canvas.show()
def updateGraph(self):
@@ -896,7 +892,7 @@ class MForm(QtGui.QWidget):
nx.draw_networkx_labels(self.G, self.pos,
ax=self.sp, font_size=12)
- self.canvas.draw()
+ self.f.canvas.draw()
class MyApp(object):
- [Commit-gnuradio] [gnuradio] branch maint updated (0a1a76d -> 4ab650a), git, 2016/03/27
- [Commit-gnuradio] [gnuradio] 03/10: ctrlport: gr-perf-monitorx: add small offset to avoid log(0) calls., git, 2016/03/27
- [Commit-gnuradio] [gnuradio] 01/10: ctrlport: Some version issues for running gr-perf-monitorx, git, 2016/03/27
- [Commit-gnuradio] [gnuradio] 04/10: pmt::is_dict() and is_pair() both return true for both dictionaries and pairs. This causes issues as one may believe they have a dictionary pmt and attempt to reference it's keys (which will throw an exception for a pair). This simply serves to document this behavior, git, 2016/03/27
- [Commit-gnuradio] [gnuradio] 07/10: gr-fec: correcting function name in GRC xml, git, 2016/03/27
- [Commit-gnuradio] [gnuradio] 02/10: ctrlport: gr-perf-monitorx - don't stash the canvas, ask the figure.,
git <=
- [Commit-gnuradio] [gnuradio] 06/10: gr-fec: update/add documentation for LDPC GRC blocks., git, 2016/03/27
- [Commit-gnuradio] [gnuradio] 05/10: Merge remote-tracking branch 'jgilbert/pmt_doc_update' into maint, git, 2016/03/27
- [Commit-gnuradio] [gnuradio] 10/10: gr-fec: Address make error when parallelism = 1 or 2., git, 2016/03/27
- [Commit-gnuradio] [gnuradio] 09/10: gr-fec: Adding doc in BER Curve Gen. block re: parallelism., git, 2016/03/27
- [Commit-gnuradio] [gnuradio] 08/10: gr-fec: Address missing block error in example GRC file., git, 2016/03/27