我正在嘗試使用
PS:如果你只想顯示積極的部分,你可以使用where引數:
y0 = slope0 * x intercept0
plt.fill_between(x, y0, 0, where=y0 >= 0, interpolate=True, color='yellow')
plt.axhline(0, color='black') # shows the x-axis at y=0

轉載請註明出處,本文鏈接:https://www.uj5u.com/houduan/344671.html
標籤:Python 麻木的 matplotlib 阴谋
