Skip to content

mpl2.0.1 seems to have broken Qt4Agg #8563

Closed

Description

@nbecker

mpl2.0 was OK
This is fedora 25
mpl updated via pip
python3.5.2
switch to Qt5Agg works

import numpy as np
import matplotlib.pyplot as plt
plt.plot (np.arange(10))
plt.show()

python3 ./test_mpl.py
Traceback (most recent call last):
File "./test_mpl.py", line 3, in
plt.plot (np.arange(10))
File "/home/nbecker/.local/lib/python3.5/site-packages/matplotlib/pyplot.py", line 3306, in plot
ax = gca()
File "/home/nbecker/.local/lib/python3.5/site-packages/matplotlib/pyplot.py", line 950, in gca
return gcf().gca(**kwargs)
File "/home/nbecker/.local/lib/python3.5/site-packages/matplotlib/pyplot.py", line 586, in gcf
return figure()
File "/home/nbecker/.local/lib/python3.5/site-packages/matplotlib/pyplot.py", line 535, in figure
**kwargs)
File "/home/nbecker/.local/lib/python3.5/site-packages/matplotlib/backends/backend_qt4agg.py", line 46, in new_figure_manager
return new_figure_manager_given_figure(num, thisFig)
File "/home/nbecker/.local/lib/python3.5/site-packages/matplotlib/backends/backend_qt4agg.py", line 54, in new_figure_manager_given_figure
return FigureManagerQT(canvas, num)
File "/home/nbecker/.local/lib/python3.5/site-packages/matplotlib/backends/backend_qt5.py", line 488, in init
self.toolbar = self._get_toolbar(self.canvas, self.window)
File "/home/nbecker/.local/lib/python3.5/site-packages/matplotlib/backends/backend_qt5.py", line 539, in _get_toolbar
toolbar = NavigationToolbar2QT(canvas, parent, False)
File "/home/nbecker/.local/lib/python3.5/site-packages/matplotlib/backends/backend_qt5.py", line 585, in init
NavigationToolbar2.init(self, canvas)
File "/home/nbecker/.local/lib/python3.5/site-packages/matplotlib/backend_bases.py", line 2760, in init
self._init_toolbar()
File "/home/nbecker/.local/lib/python3.5/site-packages/matplotlib/backends/backend_qt5.py", line 601, in _init_toolbar
a = self.addAction(self._icon(image_file + '.png'),
File "/home/nbecker/.local/lib/python3.5/site-packages/matplotlib/backends/backend_qt5.py", line 591, in _icon
pm.setDevicePixelRatio(self.canvas._dpi_ratio)
AttributeError: 'QPixmap' object has no attribute 'setDevicePixelRatio'

Activity

  1. tacaswell commented on May 3, 2017

    @tacaswell
    Member

    FIxed by #8559

    2.0.2 will be coming shortly to see if we have any other un-caught issues.

  2. added this to the milestone on May 3, 2017
  3. modified the milestones: , on May 7, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions