Python 中利用 matplotlib 进行曲线的部分填充 fill_betweenx
实现效果:
代码:
def Plot_LSH_Curve(b, r, Sim_T):
s = np.arange(0, 1, 0.01)
p = 1 - np.power(1 - np.power(s, r), b)
fig = plt.figure()
ax = plt.gca()
# ax = fig.add_subplot(111)
ax.plot(s, p, color='red', linewidth=2)
plt.vlines(Sim_T, [0], 1, color="green", linewidth=