0
我跑幾個代碼,並獲得形象化我matplotlib輸出
Draw = pf.plot_drawdown_periods(returns, top=5).set_xlabel('Date')
type(Draw)
<matplotlib.text.Text at 0x7fb063733f90>
怎樣才能使我的結果以不同的方式可見?
我跑幾個代碼,並獲得形象化我matplotlib輸出
Draw = pf.plot_drawdown_periods(returns, top=5).set_xlabel('Date')
type(Draw)
<matplotlib.text.Text at 0x7fb063733f90>
怎樣才能使我的結果以不同的方式可見?
您需要明確調用pyplot.show()
來顯示圖形。
import matplotlib.pyplot as plt
pf.plot_drawdown_periods(returns, top=5).set_xlabel('Date')
plt.show()