<p dir="auto"><a href="https://sourceforge.net/tracker/?func=detail&amp;aid=3085006&amp;group_id=80706&amp;atid=560723" rel="nofollow">Original report at SourceForge, opened Sun Oct 10 22:25:55 2010</a></p>
<p dir="auto">This would probably be in mlab. I haven't checked but the count plotting functions probably use a private function similar to contourc behind the scenes. Having access to this would be great. Currently I am creating a figure. drawing a contour plot, than closing the figure.</p>
<h3 dir="auto">Bug report</h3>
<p dir="auto">Only the first bar in barplot has border when edgecolor is a single value.</p>
<p dir="auto"><strong>Bug summary</strong></p>

<p dir="auto"><strong>Code for reproduction</strong></p>

<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import matplotlib.pyplot as plt


def main():

    fig = plt.figure()
    ax = plt.gca()

    data = list(range(5, 10))

    ax.bar(data, data, width=0.5, align=&quot;edge&quot;, linewidth=2,
           edgecolor=&quot;k&quot;, facecolor=&quot;m&quot;)

    plt.show()


if __name__ == '__main__':
    main()"><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-s1">matplotlib</span>.<span class="pl-s1">pyplot</span> <span class="pl-k">as</span> <span class="pl-s1">plt</span>


<span class="pl-k">def</span> <span class="pl-en">main</span>():

    <span class="pl-s1">fig</span> <span class="pl-c1">=</span> <span class="pl-s1">plt</span>.<span class="pl-en">figure</span>()
    <span class="pl-s1">ax</span> <span class="pl-c1">=</span> <span class="pl-s1">plt</span>.<span class="pl-en">gca</span>()

    <span class="pl-s1">data</span> <span class="pl-c1">=</span> <span class="pl-en">list</span>(<span class="pl-en">range</span>(<span class="pl-c1">5</span>, <span class="pl-c1">10</span>))

    <span class="pl-s1">ax</span>.<span class="pl-en">bar</span>(<span class="pl-s1">data</span>, <span class="pl-s1">data</span>, <span class="pl-s1">width</span><span class="pl-c1">=</span><span class="pl-c1">0.5</span>, <span class="pl-s1">align</span><span class="pl-c1">=</span><span class="pl-s">"edge"</span>, <span class="pl-s1">linewidth</span><span class="pl-c1">=</span><span class="pl-c1">2</span>,
           <span class="pl-s1">edgecolor</span><span class="pl-c1">=</span><span class="pl-s">"k"</span>, <span class="pl-s1">facecolor</span><span class="pl-c1">=</span><span class="pl-s">"m"</span>)

    <span class="pl-s1">plt</span>.<span class="pl-en">show</span>()


<span class="pl-k">if</span> <span class="pl-s1">__name__</span> <span class="pl-c1">==</span> <span class="pl-s">'__main__'</span>:
    <span class="pl-en">main</span>()</pre></div>
<p dir="auto"><strong>Actual outcome</strong><br>
<a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/900941/33040920-97d81072-ce0a-11e7-8bcb-1f5b24f0934b.png"><img src="https://user-images.githubusercontent.com/900941/33040920-97d81072-ce0a-11e7-8bcb-1f5b24f0934b.png" alt="screen shot 2017-11-20 at 15 50 34" style="max-width: 100%;"></a></p>
<p dir="auto"><strong>Expected outcome</strong></p>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/900941/33040975-c655e05a-ce0a-11e7-9709-8b977428aa5f.png"><img src="https://user-images.githubusercontent.com/900941/33040975-c655e05a-ce0a-11e7-9709-8b977428aa5f.png" alt="screen shot 2017-11-20 at 15 51 51" style="max-width: 100%;"></a></p>

<p dir="auto">I can work around the issue by specifying a list of edgecolors and linewidths for each bar. Specifying only the list of linewidths for each bar and leaving one value for the edgecolor would only show a border of the first bar due to this code in the Patch.draw:</p>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="        lw = self._linewidth
        if self._edgecolor[3] == 0:
            lw = 0"><pre class="notranslate">        <span class="pl-s1">lw</span> <span class="pl-c1">=</span> <span class="pl-s1">self</span>.<span class="pl-s1">_linewidth</span>
        <span class="pl-k">if</span> <span class="pl-s1">self</span>.<span class="pl-s1">_edgecolor</span>[<span class="pl-c1">3</span>] <span class="pl-c1">==</span> <span class="pl-c1">0</span>:
            <span class="pl-s1">lw</span> <span class="pl-c1">=</span> <span class="pl-c1">0</span></pre></div>

<p dir="auto"><strong>Matplotlib version</strong></p>

<ul dir="auto">
<li>Operating system: Linux</li>
<li>Matplotlib version: 2.1.0</li>
<li>Matplotlib backend (<code class="notranslate">print(matplotlib.get_backend())</code>): TkAgg</li>
<li>Python version: Python 3.6.2</li>
</ul>

<p dir="auto">I installed matplotlib using conda. But I am not sure from which channel.</p>