Matplotlib条形图线宽不起作用

时间:2017-11-20 23:53:02

标签: python matplotlib

在条形图上设置edgecolor和width会导致只有一个条形图围绕它显示一条线:

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

添加alpha参数似乎可以解决问题:

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

enter image description here

这似乎是一个错误,但也许我错过了什么?

0 个答案:

没有答案
相关问题