我想在 google colab 中使用 matplotlib 創建一個互動式繪圖。這似乎是一項復雜的任務,所以我需要一些幫助來將 matplotlib 中的這段代碼轉換為 Plotly。
close = df['A']
fig = plt.figure(figsize = (15,5))
plt.plot(close, color='r', lw=2.)
plt.plot(close, '^', markersize=10, color='m', label = 'signal X', markevery = df_x)
plt.plot(close, 'v', markersize=10, color='k', label = 'signal Y', markevery = df_y)
plt.title('Turtle Agent: total gains %f, total investment %f%%'%(df_A, df_B))
plt.legend()
plt.show()

uj5u.com熱心網友回復:
- 使用來自plotly OHLC 示例的樣本資料
轉載請註明出處,本文鏈接:https://www.uj5u.com/houduan/339915.html標籤:Python matplotlib 情节地 交互的 绘图蟒蛇
上一篇:如何繪制一維K均值聚類
