matplotlib / matplotlib/mplfinance
`vlines` (vertical lines, sharing x axis) on multiple panels
Dieses Issue hat noch niemand übernommen.
- Vorherrschende Sprache
- Python
- Sterne
- 4.4k
- Forks
- 678
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Beschreibung
Hello Daniel, 👋
Thank you for your dedication in improving the MPF library ! 📈
I am looking for different options for the X_AXIS/GRID adjustments:
-
[1] : Drawing vertical line for all panels ( when passing
**kwargs(vlines)tompf.plot()it is not drawing on all panels) -
[2] : Adjusting the
gridforx_axiswith MPF. I seen other examples where we have to useaxes. Is there a more efficient way to do that with MPF?
If i well understood what others did is, returning the axes and then calling the add_subplot method from MPL wich will force me to start again from scratch using only MPL.
I guess I missed something, here is a part of my code:
df = 'pandas dataframe with datetime index and ohlcv and RSI values'
vls = pd.date_range(df.index.min(), df.index.max(), freq='D').tolist()
ap1 = [
mpf.make_addplot(df['RSI'], panel=1, color='royalblue')
]
kwargs = dict(type='candle', vlines=dict(vlines=vls, linewidths=0.5, colors=('r')))
mpf.plot(df, addplot=ap1, **kwargs)
(If you prefer 2 different posts i can separate each request..)
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 mit dem bereitgestellten mpf.plot()-Beispiel unter Verwendung von addplot, vlines und einem pandas-datetime-Index und untersuche anschließend, wie vertikale Linien und Einstellungen für das x-Achsenraster über die Panels hinweg angewendet werden. Als abgeschlossen gilt die Aufgabe, wenn vertikale Linien auf allen Panels erscheinen und das x-Achsenraster über MPF angepasst werden kann, ohne das Diagramm mit Matplotlib neu erstellen zu müssen.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- matplotlib, pandas, python
- Bereich
- data-visualization
- Issue-Typ
- Bug
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 35/100