[Matplotlib-users] ax.bar edgecolor fails for scalar color?

Benjamin Root ben.v.root at gmail.com
Tue Oct 10 10:52:34 EDT 2017


Actually, to be honest, I can't remember what the solution was.  CC'ing
Thomas because I think he figured it out later on during the tutorial.

Ben

On Tue, Oct 10, 2017 at 10:50 AM, Benjamin Root <ben.v.root at gmail.com>
wrote:

> Yeah, I think we ran into that during the live tutorial. IIRC, the `color`
> keyword argument was overriding the `edgecolor` keyword argument.
>
> On Tue, Oct 10, 2017 at 10:40 AM, Andrew Jaffe <a.h.jaffe at gmail.com>
> wrote:
>
>> Hi,
>>
>> I've been working through Ben Root's excellent Anatomy of Matplotlib
>> tutorial at https://github.com/matplotlib/AnatomyOfMatplotlib/.
>>
>> In the course of this (exercise 2.1 in particular), I've noticed that the
>> `edgecolor` argument to `ax.bar(...)` doesn't work as advertised:
>>
>> > edgecolor : scalar or array-like, optional
>> >    the colors of the bar edges
>>
>> However, it doesn't seem to work as a scalar: in that case it only
>> applies to the first bar; instead you need to supply `(color,)*len(x)` or
>> similar.
>>
>> It fails the same way whether or not we use something like
>> `plt.style.use('classic')` or `mpl.rcParams['patch.force_edgecolor'] =
>> True`
>>
>> Is this a bug, something weird in my setup, or am I missing something?
>>
>> Andrew
>>
>> _______________________________________________
>> Matplotlib-users mailing list
>> Matplotlib-users at python.org
>> https://mail.python.org/mailman/listinfo/matplotlib-users
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/matplotlib-users/attachments/20171010/9982f184/attachment.html>


More information about the Matplotlib-users mailing list