Update plot, remove old data show new data
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 20/100
- issue の種類
- 機能追加
- 明瞭さ
- 説明が足りない
- 活発さ
- 停滞
- 技術スタック
- python
調査の方向性
issue に示されている _make_empty_graph と _make_graph のエントリーポイントから始め、FigureCanvasTkAgg のセットアップと graph_frame のクリーンアップを含めます。plotting API が既存の figure の置き換えをどのように処理するか、また要求された空の初期グラフと後続のインジケーターがサポートされているかを確認します。完了とするには、文書化され合意されたアプローチが必要ですが、具体的なリポジトリファイルやテストは特定されていません。
索引モデルが issue の本文から書いたものです。
説明
Thanks for an amazing library!
I'm trying to create an application where the user can select a ticker and then click a button that prints candlesticks for the ticker. I'm plotting the graph inside a frame in Tkinter.

The user can select a ticker in the drop down and Graph the data for the ticker.

I first create the empty graph
def _make_empty_graph(self):
self.fig = mpf.figure()
self.canvas = FigureCanvasTkAgg(self.fig, self.graph_frame)
self.canvas.get_tk_widget().pack()
I then create the graph with data from a dataframe, after the user has selected a ticker and clicked "Graph". I destroy the children in the frame to not add another graph under the previous graph. The user can then select yet another ticker and graph it.
def _make_graph(self, ticker_data=None):
self._get_ticker_data()
for widgets in self.graph_frame.winfo_children():
widgets.destroy()
self.fig, _ = mpf.plot(self.ticker_df, type='candle',
title = f'{self.ticker_var.get()}',
volume=True, style='binance', returnfig=True)
self.canvas = FigureCanvasTkAgg(self.fig, self.graph_frame)
self.canvas.get_tk_widget().pack()
Can I solve this a bit more elegant by using subplots or similar and then just clear the graph before I create the new graph? I still want to show an empty graph in the beginning. Do I need to create the empty graph in some other way to be able to update it later? Later on I like to add buttons to be able to RSI, Bollinger bands etc. on top the candlesticks.
Suggestions are greatly appreciated.
- 主要言語
- Python
- スター
- 4.4k
- フォーク
- 678
- PR マージ指標
- 30日以内にマージされた PR はありません
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
matplotlib/mplfinance のほかの issue
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
matplotlib/mplfinance#672 ·
-
難易度 5/5 1週間以上 初心者へのやさしさ 10/100
matplotlib/mplfinance#700 ·
-
enhancement
難易度 5/5 1週間以上 初心者へのやさしさ 30/100
matplotlib/mplfinance#695 ·
-
question
難易度 3/5 1〜2日 初心者へのやさしさ 25/100
matplotlib/mplfinance#691 · コメント 1 件 ·
-
question
難易度 4/5 3〜5日 初心者へのやさしさ 52/100
matplotlib/mplfinance#690 · コメント 5 件 ·
matplotlib/mplfinance の issue をすべて見る
似ている issue
-
agent-ready documentation needs-triage
難易度 1/5 1〜3時間 初心者へのやさしさ 88/100
-
documentation
難易度 1/5 1時間未満 初心者へのやさしさ 91/100
-
workflow-status page template still says reusable workflows are "triggered only by workflow_call:" オープン
難易度 1/5 1時間未満 初心者へのやさしさ 92/100
-
instance instance add
難易度 1/5 1時間未満 初心者へのやさしさ 72/100
searxng/searx-instances#939 · コメント 1 件 ·
-
area-deployment area-integrations triage:bot-seen
難易度 2/5 半日 初心者へのやさしさ 86/100