matplotlib / matplotlib/mplfinance
Feature Request:addplot does not take dataframe index
Nessuno ha ancora preso questa issue.
- Lingua principale
- Python
- Stelle
- 4.4k
- Fork
- 678
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Descrizione
I would like to plot two data as below.
```
plot2 = mpf.make_addplot(data2, type='candle')
mpf.plot(data, type='candle', addplot=plot2)
```
However, the problem is that data2 contains 3 candles and data contains 4 candles with different indices.
data2.index
`['2021-01-05', '2021-01-06', '2021-01-07']`
data.index
`['2021-01-04', '2021-01-05', '2021-01-06', '2021-01-07']`
Despite the fact that the time index of data2 starts from 2021-01-05, the plot starts from 2021-01-04
You can see three overlapped candles on 01-04, 01-05, 01-06.

Please allow addplot to have its own x values as the index of the input dataframe.
Guida per i contributori
Apri la guida per i contributori
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.
Direzione di ricerca
Start by reproducing the reported example with mpf.make_addplot() and mpf.plot(), using the two dataframes and their differing indices. Inspect how addplot data is positioned relative to the main plot's x values. Done means addplot uses its input dataframe index so the three candles align with 2021-01-05 through 2021-01-07 rather than starting at 2021-01-04.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- matplotlib, python
- Ambito
- data-visualization
- Tipo di issue
- Funzionalità
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 35/100