mplfinance icon indicating copy to clipboard operation
mplfinance copied to clipboard

Feature Request: Accept alpha as list instance for hlines

Open schroederjoa opened this issue 3 years ago • 1 comments

It is possible to use lists as input for hlines parameters such as colors, linestyle, linewidths and therefore specify each hline individually. However, this does not seem possible with alpha because it would only accept float, int instance, resulting in the same alpha for all hlines. Would it be possible to implement the same functionality for alpha than for the other parameters? Thank you! Using latest version 0.12.9b1. Cheers, Joachim

schroederjoa avatar Sep 11 '22 10:09 schroederjoa

Joachim, This looks pretty easy to do. Let me know if you would like me to guide you through the process, so that you can make the change and contribute to the library. (I am currently distracted with other projects).

All the best. --Daniel

DanielGoldfarb avatar Sep 12 '22 02:09 DanielGoldfarb

I'm on it!

nijek avatar Oct 08 '22 22:10 nijek

@nijek Great! This is probably as simple as changing the 'alpha' validator to allow a list, similar to how the 'linewidths' validator just above it allows a list. Much appreciated. Thanks.

DanielGoldfarb avatar Oct 09 '22 02:10 DanielGoldfarb

That is great, thank you very much everyone!

On 10/9/22 04:44, Daniel Goldfarb wrote:

@nijek https://github.com/nijek Great! This is probably as simple as changing the |'alpha'| validator https://github.com/matplotlib/mplfinance/blob/master/src/mplfinance/_utils.py#L499-L510 to allow a list, *similar to how the |'linewidths'| validator just above it allows a list. Much appreciated. Thanks.

— Reply to this email directly, view it on GitHub https://github.com/matplotlib/mplfinance/issues/554#issuecomment-1272439496, or unsubscribe https://github.com/notifications/unsubscribe-auth/AECPPGVM3JT6252EPG26UJTWCIWPNANCNFSM6AAAAAAQJW6BJE. You are receiving this because you authored the thread.Message ID: @.***>

schroederjoa avatar Oct 09 '22 12:10 schroederjoa

@nijek Thank you!

DanielGoldfarb avatar Oct 14 '22 15:10 DanielGoldfarb