[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Commit-gnuradio] [gnuradio] 01/10: ctrlport: Some version issues for ru
From: |
git |
Subject: |
[Commit-gnuradio] [gnuradio] 01/10: ctrlport: Some version issues for running gr-perf-monitorx |
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 6ee44604465f8c0c405be58c04346d38e60ce093
Author: Tom Rondeau <address@hidden>
Date: Wed Mar 9 15:59:06 2016 -0500
ctrlport: Some version issues for running gr-perf-monitorx
Newer Matplotlib and Networkx modules have altered a few things on
us. Doing some extra checks and setup to work with, hopefully, all
current versions.
---
.../python/gnuradio/ctrlport/gr-perf-monitorx | 22 +++++++++++++++++++---
1 file changed, 19 insertions(+), 3 deletions(-)
diff --git a/gnuradio-runtime/python/gnuradio/ctrlport/gr-perf-monitorx
b/gnuradio-runtime/python/gnuradio/ctrlport/gr-perf-monitorx
index bb53e02..4fd09dc 100644
--- a/gnuradio-runtime/python/gnuradio/ctrlport/gr-perf-monitorx
+++ b/gnuradio-runtime/python/gnuradio/ctrlport/gr-perf-monitorx
@@ -28,7 +28,18 @@ try:
matplotlib.use("QT4Agg")
import matplotlib.pyplot as plt
from matplotlib.backends.backend_qt4agg import FigureCanvasQTAgg as
FigureCanvas
- from matplotlib.backends.backend_qt4agg import NavigationToolbar2QTAgg as
NavigationToolbar
+
+ # Manage different matplotlib versions
+ try:
+ from matplotlib.backends.backend_qt4agg import NavigationToolbar2QTAgg
as NavigationToolbar
+ except ImportError:
+ try:
+ from matplotlib.backends.backend_qt4agg import
NavigationToolbar2QT as NavigationToolbar
+ except ImportError:
+ print sys.argv[0], "could not load QTAgg backend."
+ sys.exit(1)
+
+
from matplotlib.figure import Figure
except ImportError:
print sys.argv[0], "requires networkx and matplotlib.", \
@@ -42,6 +53,11 @@ import itertools
from gnuradio import gr, ctrlport
from gnuradio.ctrlport.GrDataPlotter import *
+if float(nx.__version__) >= 1.11:
+ from networkx.drawing.nx_agraph import graphviz_layout
+else:
+ graphviz_layout = nx.graphviz_layout
+
class MAINWindow(QtGui.QMainWindow):
def minimumSizeHint(self):
return QtGui.QSize(800,600)
@@ -778,8 +794,8 @@ class MForm(QtGui.QWidget):
self.canvas = FigureCanvas(self.f)
self.layout.addWidget(self.canvas);
- self.pos = nx.graphviz_layout(self.G);
- #self.pos = nx.pygraphviz_layout(self.G);
+ self.pos = graphviz_layout(self.G);
+ #self.pos = pygraphviz_layout(self.G);
#self.pos = nx.spectral_layout(self.G);
#self.pos = nx.circular_layout(self.G);
#self.pos = nx.shell_layout(self.G);
- [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 <=
- [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, 2016/03/27
- [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