matplotlib / matplotlib/mplfinance

How can i avoid candles compression when placing horizontal lines?

Offen
#270 2 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

question
Vorherrschende Sprache
Python
Sterne
4.4k
Forks
678
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

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)

Beitragsleitfaden

Beitragsleitfaden öffnen

Erste Schritte

  1. Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
  3. Forke das Repository und arbeite in einem Branch.
  4. Öffne einen Pull Request, der die Issue-Nummer nennt.

Rechercherichtung

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.

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
Muss geklärt werden
Anfängerfreundlichkeit
25/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.