<p dir="auto">Following a discussion with <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/NelleV/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/NelleV">@NelleV</a> I suggest to decrease the number of CI builds to help easing the backlog.</p>
<ul dir="auto">
<li>drop USE_PYTEST (now useless)</li>
</ul>
<p dir="auto">On Travis, e.g.:</p>
<ul dir="auto">
<li>py2.7 mock numpy=1.7 pandas docs</li>
<li>py3.4</li>
<li>py3.6 pandas docs pep8 delete-font-cache</li>
<li>osx (=2.7) mock</li>
</ul>
<p dir="auto">Note that we really should build the docs on 2.7 too (extra points if we build them on OSX instead of the Linux 2.7 job) -- right now they don't build on 2.7 at all (due to failure in examples).</p>
<p dir="auto">On Appveyor the third job is currently a duplicate of the second(!) except that one has USE_PYTEST and not the other (which is the same).  So we could be left with</p>
<ul dir="auto">
<li>py2.7 numpy=1.8 without extra dependencies</li>
<li>py3.5 numpy=1.10 without extra dependencies</li>
<li>py2.7 numpy=1.10 <em>32-bit</em> with extra dependencies<br>
(the last two could be merged into e.g. py3.5 numpy=1.10 32-bit with extra dependencies, if we're still under backlog pressure)</li>
</ul>
<p dir="auto">More extra points if someone manages to build the docs on Windows...</p>
<p dir="auto"><strong>Report</strong></p>
<p dir="auto"><strong>Summary</strong><br>
I was trying to use networkx to draw some graphs but matplotlib fails. So I tested some actual matplotlib examples without including networkx related code and I reproduced the same error. I suspect it may be related to Qt but cannot be sure. The error states as:</p>
<blockquote>
<p dir="auto">AttributeError: 'QPixmap' object has no attribute 'setDevicePixelRatio'</p>
</blockquote>
<p dir="auto"><strong>Code for reproduction</strong></p>
<p dir="auto">I am using python 2.7. The code I used was:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="import numpy as np
import matplotlib.pyplot as plt

X = np.linspace(-np.pi, np.pi, 256, endpoint=True)
C,S = np.cos(X), np.sin(X)

plt.plot(X,C)
plt.plot(X,S)

plt.show()"><pre class="notranslate"><code class="notranslate">import numpy as np
import matplotlib.pyplot as plt

X = np.linspace(-np.pi, np.pi, 256, endpoint=True)
C,S = np.cos(X), np.sin(X)

plt.plot(X,C)
plt.plot(X,S)

plt.show()
</code></pre></div>
<p dir="auto">but it already fails in this line:</p>
<p dir="auto"><code class="notranslate">plt.plot(X,C)</code></p>
<p dir="auto"><strong>Expected outcome</strong><br>
Expected outcome is this picture:</p>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://camo.githubusercontent.com/dfdccd3ad6495f3b101161a6e265228ac8650b86e2370babade6b0aedef1670e/68747470733a2f2f7777772e6c616272692e66722f706572736f2f6e726f75676965722f7465616368696e672f6d6174706c6f746c69622f666967757265732f65786572636963655f312e706e67"><img src="https://camo.githubusercontent.com/dfdccd3ad6495f3b101161a6e265228ac8650b86e2370babade6b0aedef1670e/68747470733a2f2f7777772e6c616272692e66722f706572736f2f6e726f75676965722f7465616368696e672f6d6174706c6f746c69622f666967757265732f65786572636963655f312e706e67" alt="picture" data-canonical-src="https://www.labri.fr/perso/nrougier/teaching/matplotlib/figures/exercice_1.png" style="max-width: 100%;"></a></p>
<p dir="auto"><strong>Matplotlib version</strong></p>
<ul dir="auto">
<li>Operating System: Lubuntu, 14.04.5 LTS</li>
<li>Matplotlib Version: 2.0.1</li>
<li>Python Version: Python 2.7.6</li>
</ul>
<p dir="auto">Qmake:</p>
<blockquote>
<p dir="auto">qmake --version<br>
QMake version 3.0<br>
Using Qt version 5.2.1 in /usr/lib/x86_64-linux-gnu</p>
</blockquote>
<p dir="auto">System info:</p>
<blockquote>
<p dir="auto">Distributor ID: Ubuntu<br>
Description: Ubuntu 14.04.5 LTS<br>
Release:	14.04<br>
Codename: trusty</p>
</blockquote>
<blockquote>
<p dir="auto">uname -a<br>
Linux thesisvm 4.4.0-75-generic <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="816376" data-permission-text="Title is private" data-url="https://github.com/matplotlib/matplotlib/issues/96" data-hovercard-type="pull_request" data-hovercard-url="/matplotlib/matplotlib/pull/96/hovercard" href="https://github.com/matplotlib/matplotlib/pull/96">#96</a>~14.04.1-Ubuntu SMP Thu Apr 20 11:06:30 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux</p>
</blockquote>
<p dir="auto">Matplotlib info:</p>
<blockquote>
<p dir="auto">matplotlib.<strong>version</strong><br>
'2.0.1'<br>
matplotlib.<strong>file</strong><br>
'/usr/local/lib/python2.7/dist-packages/matplotlib/<strong>init</strong>.pyc'</p>
</blockquote>
<p dir="auto">I cannot reproduce all the commands I issued but can give an outline.<br>
I issued these commands:</p>
<p dir="auto"><code class="notranslate">sudo apt-get build-dep python-matplotlib</code><br>
<code class="notranslate">sudo pip install matplotlib</code></p>
<p dir="auto">Full error trace:</p>
<blockquote>
<p dir="auto">plt.plot(X,C)<br>
Traceback (most recent call last):<br>
File "", line 1, in <br>
File "/usr/local/lib/python2.7/dist-packages/matplotlib/pyplot.py", line 3306, in plot<br>
ax = gca()<br>
File "/usr/local/lib/python2.7/dist-packages/matplotlib/pyplot.py", line 950, in gca<br>
return gcf().gca(**kwargs)<br>
File "/usr/local/lib/python2.7/dist-packages/matplotlib/pyplot.py", line 586, in gcf<br>
return figure()<br>
File "/usr/local/lib/python2.7/dist-packages/matplotlib/pyplot.py", line 535, in figure<br>
**kwargs)<br>
File "/usr/local/lib/python2.7/dist-packages/matplotlib/backends/backend_qt4agg.py", line 46, in new_figure_manager<br>
return new_figure_manager_given_figure(num, thisFig)<br>
File "/usr/local/lib/python2.7/dist-packages/matplotlib/backends/backend_qt4agg.py", line 54, in new_figure_manager_given_figure<br>
return FigureManagerQT(canvas, num)<br>
File "/usr/local/lib/python2.7/dist-packages/matplotlib/backends/backend_qt5.py", line 488, in <strong>init</strong><br>
self.toolbar = self._get_toolbar(self.canvas, self.window)<br>
File "/usr/local/lib/python2.7/dist-packages/matplotlib/backends/backend_qt5.py", line 539, in _get_toolbar<br>
toolbar = NavigationToolbar2QT(canvas, parent, False)<br>
File "/usr/local/lib/python2.7/dist-packages/matplotlib/backends/backend_qt5.py", line 585, in <strong>init</strong><br>
NavigationToolbar2.<strong>init</strong>(self, canvas)<br>
File "/usr/local/lib/python2.7/dist-packages/matplotlib/backend_bases.py", line 2760, in <strong>init</strong><br>
self._init_toolbar()<br>
File "/usr/local/lib/python2.7/dist-packages/matplotlib/backends/backend_qt5.py", line 601, in _init_toolbar<br>
a = self.addAction(self._icon(image_file + '.png'),<br>
File "/usr/local/lib/python2.7/dist-packages/matplotlib/backends/backend_qt5.py", line 591, in _icon<br>
pm.setDevicePixelRatio(self.canvas._dpi_ratio)<br>
AttributeError: 'QPixmap' object has no attribute 'setDevicePixelRatio'</p>
</blockquote>