Update plot, remove old data show new data
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 20/100
- Tipo de issue
- Nueva funcionalidad
- Claridad
- Necesita aclaración
- Estado de actividad
- Estancado
- Stack tecnológico
- python
- Área
- data-visualization, desktop
Línea de trabajo
Comience por los puntos de entrada _make_empty_graph y _make_graph mostrados en el issue, incluida la configuración de FigureCanvasTkAgg y la limpieza de graph_frame. Compruebe cómo la API de gráficos gestiona la sustitución de una figura existente y si admite el gráfico inicial vacío solicitado y los indicadores posteriores. Para darlo por terminado sería necesario un enfoque documentado y acordado, pero no se identifica ningún archivo específico del repositorio ni ninguna prueba.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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.
- Lenguaje dominante
- Python
- Estrellas
- 4.4k
- Forks
- 678
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de matplotlib/mplfinance
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
matplotlib/mplfinance#672 ·
-
Dificultad 5/5 Más de una semana Aptitud para principiantes 10/100
matplotlib/mplfinance#700 ·
-
enhancement
Dificultad 5/5 Más de una semana Aptitud para principiantes 30/100
matplotlib/mplfinance#695 ·
-
question
Dificultad 3/5 1-2 días Aptitud para principiantes 25/100
matplotlib/mplfinance#691 · 1 comentario ·
-
question
Dificultad 4/5 3-5 días Aptitud para principiantes 52/100
matplotlib/mplfinance#690 · 5 comentarios ·
Todos los issues de matplotlib/mplfinance
Issues similares
-
agent-ready documentation needs-triage
Dificultad 1/5 1-3 horas Aptitud para principiantes 88/100
-
documentation
Dificultad 1/5 Menos de una hora Aptitud para principiantes 91/100
-
workflow-status page template still says reusable workflows are "triggered only by workflow_call:" Abierto
Dificultad 1/5 Menos de una hora Aptitud para principiantes 92/100
-
Add https://search.jeremyh.xyz/ Abiertoinstance instance add
Dificultad 1/5 Menos de una hora Aptitud para principiantes 72/100
searxng/searx-instances#939 · 1 comentario ·
-
area-deployment area-integrations triage:bot-seen
Dificultad 2/5 Medio día Aptitud para principiantes 86/100