答案 0 :(得分:3)
您可以使用matplotlib
fill_between
,例如,
#!/usr/bin/env python
import matplotlib.pyplot as plt
import numpy as np
x = np.arange(0.0, 2, 0.1)
y = 10*np.ones(x.shape[0])
c = ['r', 'b', 'g', 'y', 'k']
fig, ax = plt.subplots()
for i in range(5):
r = np.random.randn(x.shape[0])
yp = np.copy(y)
y = y + np.cumsum(np.abs(r))
ax.fill_between(x, yp, y, color=c[i], alpha=0.5)
plt.show()
答案 1 :(得分:2)