matplotlib / matplotlib/mplfinance

How can i avoid candles compression when placing horizontal lines?

Aperta
#270 2 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

question
Lingua principale
Python
Stelle
4.4k
Fork
678
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

I've been using MPL finance for quite some time now, everything is flawless and i'm impressed by the new features!
I'm trying to fix a problem that has to do with Matplotlib itself too: once i add to my chart two horizontal lines that are far from the last price, the candles will get compressed and the chart becomes harder to read. Now i know that this happens because of the horizontal lines, but i was wondering if there is some way/method/function to scale the chart so that the candles stay less compressed while keeping the lines. Thanks in advance!

```
fig, axlist = mpf.plot(df, type='candle', figscale=2, figratio=(50, 50), style=s, returnfig=True)
ax1 = axlist[0]
ax1.axhline(8000)
ax1.axhline(14000)
```

![q](https://user-images.githubusercontent.com/65462643/95003171-cde1bf80-05dc-11eb-9eb3-db2f4bfcceed.png)

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Direzione di ricerca

No repository file or test is named. Start by reproducing the supplied mpf.plot example and inspect the relevant Matplotlib axis-scaling behavior; done would require a clearly defined, supported way to keep the horizontal lines while avoiding unreadable candle compression.

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
Da chiarire
Idoneità per principianti
25/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.