Matplotlib barplot linewidth not working

182 views Asked by At

Setting the edgecolor and width on a barplot results in only a single bar having a line around it:

import matplotlib as mpl
print(mpl.__version__)
2.1.0

mpl.pyplot.barh(y=[1, 2, 3], 
        width=[1, 2, 3],
        linewidth=2,
        edgecolor='k');

enter image description here

Adding an alpha parameter seems to correct the issue:

mpl.pyplot.barh(y=[1, 2, 3], 
        width=[1, 2, 3],
        linewidth=2,
        edgecolor='k',
        alpha=1);

enter image description here

This seems like a bug, though perhaps I am missing something?

0

There are 0 answers