📜  在 matplotlib 中控制填充模式 - Python 代码示例

📅  最后修改于: 2022-03-11 14:45:11.354000             🧑  作者: Mango

代码示例1
import pandas as pd 
import numpy as np

n = 8
a = np.random.random(n)
b = np.random.random(n)
x = np.arange(n)

plt.bar(x,a, color='w', hatch='x')
plt.bar(x,a+b, bottom = a, color = 'w', hatch = '/')
plt.show()