matplotlib / matplotlib/mplfinance
Multiple candles on same plot
Dieses Issue hat noch niemand übernommen.
- Vorherrschende Sprache
- Python
- Sterne
- 4.4k
- Forks
- 678
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Beschreibung
Hi,
I appreciate your work!
How would I plot multiple candles together side by side on the same figure?
I want to compare 1. original data, 2. modified data side by side.
So for each x value there will be 2 candles.
My first attempt was scale the width and maybe offset each candle to the side. But I could not find any option to do that.

It would be nice to have horizontal_offset keyword to place candles offset from the centre. Is what I want to achieve possible?
Hopefully I want to achieve the same with volume plot too.
If it is not possible, how about having two separate scale width for each? The candles will still be overlapped but at least they can be distinguished.
plot2 = fplt.make_addplot(data2,type='candle')
fplt.plot(data, type='candle', style=s, volume=True, addplot=plot2, scale_width_adjustment=dict(candle=0.5))
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 den im Issue gezeigten Aufrufen von fplt.make_addplot und fplt.plot und verfolge anschließend, wie Candle-Addplots und scale_width_adjustment behandelt werden. Definiere und implementiere eine unterstützte Möglichkeit, Original- und modifizierte Candles nebeneinander anzuzeigen, einschließlich des angeforderten Volumenverhaltens, und überprüfe, dass beide Datensätze sichtbar unterscheidbar sind.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- matplotlib, python
- Bereich
- data-visualization
- Issue-Typ
- Feature
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 35/100