Update plot, remove old data show new data
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 20/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Da chiarire
- Stato di attività
- Ferma
- Stack tecnologico
- python
- Ambito
- data-visualization, desktop
Direzione di ricerca
Iniziare dagli entry point _make_empty_graph e _make_graph mostrati nell’issue, includendo la configurazione di FigureCanvasTkAgg e la pulizia di graph_frame. Verificare come l’API di plotting gestisce la sostituzione di una figure esistente e se sono supportati il grafico iniziale vuoto richiesto e gli indicatori successivi. Per considerarlo completato sarebbe necessario un approccio documentato e concordato, ma non è identificato alcun file specifico del repository né alcun test.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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.
- Lingua principale
- Python
- Stelle
- 4.4k
- Fork
- 678
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Preparare l'ambiente
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di matplotlib/mplfinance
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
matplotlib/mplfinance#672 ·
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 10/100
matplotlib/mplfinance#700 ·
-
enhancement
Difficoltà 5/5 Più di una settimana Idoneità per principianti 30/100
matplotlib/mplfinance#695 ·
-
question
Difficoltà 3/5 1-2 giorni Idoneità per principianti 25/100
matplotlib/mplfinance#691 · 1 commento ·
-
question
Difficoltà 4/5 3-5 giorni Idoneità per principianti 52/100
matplotlib/mplfinance#690 · 5 commenti ·
Tutte le issue di matplotlib/mplfinance
Issue simili
-
Broken links found in docsApertadocs pydanty:is-working
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
pydantic/pydantic-ai#8863 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
run-llama/llama_index#23278 ·
I maintainer di solito rispondono entro 2 giorni
-
documentation from-review-extraction github-actions priority: low severity:nit
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 92/100
LearningCircuit/local-deep-research#6946 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
oracle/langchain-oracle#323 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 88/100
tenstorrent/tt-metal#58057 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno