matplotlib / matplotlib/mplfinance
Chart customization when using Panels..
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 have the following chart i build using the panels approach:

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
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
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.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- python
- Bereich
- data-visualization
- Issue-Typ
- Feature
- Schwierigkeit
- 5/5
- Geschätzter Aufwand
- Über eine Woche
- Aktivitätsstatus
- Veraltet
- Klarheit
- Muss geklärt werden
- Anfängerfreundlichkeit
- 25/100