更改Matplotlib矩形金環考慮下面的代碼繪製:在聯想
plt.figure(figsize=(10,6))
for k in range(nruns):
plt.plot(Thing1['Data'][:,k],color='Grey',alpha=0.10)
plt.plot(Thing2[:,1],Thing2[:,4],'ko')
a = plt.Rectangle((0, 0), 1, 1, fc="Grey",alpha=0.50)
b = plt.Rectangle((0, 0), 1, 1, fc="Black", alpha=1.00)
plt.legend([a,b], ["Thing1","Thing2"],loc=2,fontsize='small')
plt.xlabel("Time",fontsize=16)
plt.ylabel("Hijinks",fontsize=16)
plt.show()
我真的很喜歡「B」是一個圓圈,而不是一個矩形。但是我對matplotlib代碼感到非常可怕,特別是代理藝術家的使用。有沒有一種簡單的方法可以做到這一點?