matplotlib / matplotlib/mplfinance

Chart customization when using Panels..

Aperta
#398 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

Hi,
i have the following chart i build using the panels approach:
image

I need to do some customization of this:

  1. as you can see, i have the volume plotted as a series overlay on the main candle stick panel. I would like to add some opacity to the bar chart as well as have it displayed and scaled down to the lower 1/4th to 1/8th of the panel. Also, is there a concept of a z-order such that the candles are always on top of the bars and moving averages?
  2. I would like to swap the y axis..such that volume is on the right and price on the left
  3. You can see that because the volume is large for this data, it shows in exponential format...i would like to change and reduce the font to try and get it to display, or to have it scaled by 1/1000th perhaps.
  4. there is a lot white space wasted on the chart borders, and im not sure how to control that. i tried adding the tight fit parameter, but it cuts off the right y-axis values. Is there a margin or padding that can help with this and how do you use with panels?
  5. lastly, the separator line in between the panel does not appear for me as it does in the documentation..not sure why

I figure most of the above might be doable, and im just not familiar with the new panels api well enough...but having a hard time finding the docs. Can you point me to where the python docs are for the apis and the various input/parameters?

As an alternative, i tried doing tis by creating the individual figures and axis and passing those to mpl plot. However, when i try to create bar chart (which is needed for my histogram in the picture above), it fails. The line below returns a validation error complaining that 'bars' is not a valid type. when i look at the code, it does seem it is not a supported type for the plot function. is there a work around for this?

                        mpf.plot(s.data, ax = shared_axis, type = 'bars', color = s.color, ylabel='',
                                scale_width_adjustment=dict(lines=0.5),
                                update_width_config=wconfig)

Thanks much

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

Start with the panels API documentation and the shown mpf.plot(..., type='bars', ...) call; compare the requested panel, axis, scaling, spacing, separator, and bar-type behavior with the documented parameters. Reproduce the validation error and check the existing panel examples. Done means the supported behavior and any required documentation or changes are clearly defined and verified.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
python
Ambito
data-visualization
Tipo di issue
Funzionalità
Difficoltà
5/5
Tempo stimato
Più di una settimana
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.