matplotlib / matplotlib/mplfinance

Chart customization when using Panels..

Abierto
#398 2 comentarios 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

question
Lenguaje dominante
Python
Estrellas
4.4k
Forks
678
Métricas de merge de PR
Sin PR fusionados en 30 d

Descripción

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

Guía de contribución

Abrir la guía de contribución

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Línea de trabajo

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.

Escrito por el modelo de indexación a partir del texto del issue.

Evaluación

Stack tecnológico
python
Área
data-visualization
Tipo de issue
Nueva funcionalidad
Dificultad
5/5
Tiempo estimado
Más de una semana
Estado de actividad
Estancado
Claridad
Necesita aclaración
Aptitud para principiantes
25/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.