FS#50266 - [python-matplotlib] pylab plots are broken
Attached to Project:
Community Packages
Opened by Antonio Rojas (arojas) - Friday, 05 August 2016, 12:10 GMT
Last edited by Antonio Rojas (arojas) - Sunday, 28 January 2018, 23:20 GMT
Opened by Antonio Rojas (arojas) - Friday, 05 August 2016, 12:10 GMT
Last edited by Antonio Rojas (arojas) - Sunday, 28 January 2018, 23:20 GMT
|
Details
Description:
Trying to plot anything with pylab gives TypeError: connect() failed between NavigationToolbar2QT.message[str] and _show_message() In [1]: import pylab In [2]: pylab.plot(0,0) QObject::connect: Cannot connect NavigationToolbar2QT::message(QString) to (null)::_show_message() --------------------------------------------------------------------------- TypeError Traceback (most recent call last) <ipython-input-2-5e05817328f1> in <module>() ----> 1 pylab.plot(0,0) /usr/lib/python3.5/site-packages/matplotlib/pyplot.py in plot(*args, **kwargs) 3144 @_autogen_docstring(Axes.plot) 3145 def plot(*args, **kwargs): -> 3146 ax = gca() 3147 # allow callers to override the hold state by passing hold=True|False 3148 washold = ax.ishold() /usr/lib/python3.5/site-packages/matplotlib/pyplot.py in gca(**kwargs) 926 matplotlib.figure.Figure.gca : The figure's gca method. 927 """ --> 928 return gcf().gca(**kwargs) 929 930 # More ways of creating axes: /usr/lib/python3.5/site-packages/matplotlib/pyplot.py in gcf() 576 return figManager.canvas.figure 577 else: --> 578 return figure() 579 580 /usr/lib/python3.5/site-packages/matplotlib/pyplot.py in figure(num, figsize, dpi, facecolor, edgecolor, frameon, FigureClass, **kwargs) 525 frameon=frameon, 526 FigureClass=FigureClass, --> 527 **kwargs) 528 529 if figLabel: /usr/lib/python3.5/site-packages/matplotlib/backends/backend_qt5agg.py in new_figure_manager(num, *args, **kwargs) 41 FigureClass = kwargs.pop('FigureClass', Figure) 42 thisFig = FigureClass(*args, **kwargs) ---> 43 return new_figure_manager_given_figure(num, thisFig) 44 45 /usr/lib/python3.5/site-packages/matplotlib/backends/backend_qt5agg.py in new_figure_manager_given_figure(num, figure) 49 """ 50 canvas = FigureCanvasQTAgg(figure) ---> 51 return FigureManagerQT(canvas, num) 52 53 /usr/lib/python3.5/site-packages/matplotlib/backends/backend_qt5.py in __init__(self, canvas, num) 463 if self.toolbar is not None: 464 self.window.addToolBar(self.toolbar) --> 465 self.toolbar.message.connect(self._show_message) 466 tbs_height = self.toolbar.sizeHint().height() 467 else: TypeError: connect() failed between NavigationToolbar2QT.message[str] and _show_message() Same result with any plot I tried. |
This task depends upon
Tested in 2.1.2-1,
import pylab
pylab.plot(0,0)
now works as expected.