matplotlib / matplotlib/mplfinance
how can I embed my mplfinance graph(mpf_animation_demo1.py) in Tkinter ?
Dieses Issue hat noch niemand übernommen.
- Vorherrschende Sprache
- Python
- Sterne
- 4.4k
- Forks
- 678
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Beschreibung
Ask anything you want about mplfinance usage, project philosophy and/or priorities, or anything else related to mplfinance.
Display the following animation graph on the tkinter,environment:python3.6 +windows10 desktop
Below is mpf_animation_demo1.py:
```python
import pandas as pd
import mplfinance as mpf
import matplotlib.animation as animation
idf = pd.read_csv('data/SPY_20110701_20120630_Bollinger.csv',index_col=0,parse_dates=True)
idf.shape
idf.head(3)
idf.tail(3)
df = idf.loc['2011-07-01':'2011-12-30',:]
fig = mpf.figure(style='charles',figsize=(7,8))
ax1 = fig.add_subplot(2,1,1)
ax2 = fig.add_subplot(3,1,3)
def animate(ival):
if (20+ival) > len(df):
print('no more data to plot')
ani.event_source.interval *= 3
if ani.event_source.interval > 12000:
exit()
return
data = df.iloc[0:(20+ival)]
ax1.clear()
ax2.clear()
mpf.plot(data,ax=ax1,volume=ax2,type='candle')
ani = animation.FuncAnimation(fig, animate, interval=250)
mpf.show()
```
Beitragsleitfaden
Erste Schritte
- Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
- Forke das Repository und arbeite in einem Branch.
- Öffne einen Pull Request, der die Issue-Nummer nennt.
Rechercherichtung
Beginne damit, das bereitgestellte Beispiel mpf_animation_demo1.py auszuführen und zu überprüfen, wie es die mplfinance-Figur und die Animation erstellt. Untersuche, wie diese Figur in einem Tkinter-Desktopfenster unter Python 3.6 und Windows 10 eingebettet werden kann; abgeschlossen ist die Aufgabe, wenn die Kerzenanimation innerhalb von Tkinter angezeigt wird und aktualisiert wird.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- pandas, python
- Bereich
- data-visualization, desktop
- Issue-Typ
- Feature
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Muss geklärt werden
- Anfängerfreundlichkeit
- 25/100