设置堆栈图线的颜色不起作用

use*_*044 3 python matplotlib python-2.7

我试图将堆栈图的线条颜色设置为白色,但我研究的解决方案似乎不起作用。还有哪些其他选择?

from matplotlib import pyplot as plt
y = [1,3,5]
x = [0,1,2]
fig, ax = plt.subplots()
ax.stackplot(x, y)
ax.fill_between(x, y, facecolor='#ededed')
plt.show()
Run Code Online (Sandbox Code Playgroud)

sty*_*ane 5

那这个呢:

ax.stackplot(x, y, color='b', colors=('red',))
Run Code Online (Sandbox Code Playgroud)

在此处输入图片说明