[Matplotlib-users] ax.bar edgecolor fails for scalar color?
Andrew Jaffe
a.h.jaffe at gmail.com
Tue Oct 10 10:40:00 EDT 2017
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
More information about the Matplotlib-users
mailing list