-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Modified 'candlestick' function in response to request #2546 #3016
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
jdgd1
commented
Apr 28, 2014
- Added ability for the candlestick function to use a "light" and "dark" theme
- Fill color of candlestick bodies can be user definite and is based upon stock price movement on each given period
- In the light theme (which uses a white background) candlestick shadows are dark; ie: Follows traditional candlestick format
- In dark theme (which uses black background) candlestick shadows match box colors
1. Added ability for the candlestick function to use a "light" and "dark" theme 2. Fill color of candlestick bodies can be user definite and is based upon stock price movement on each given period 3. In the light theme (which uses a white background) candlestick shadows are dark; ie: Follows traditional candlestick format 4. In dark theme (which uses black background) candlestick shadows match box colors
if theme == 'light': | ||
coloredge = 'k' | ||
coloredgeup = 'k' | ||
coloredgedown = 'k' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is kind of odd that the default behavior is to ignore explicitly passed kwargs. I think it would be better hove have all of the color kwargs default to None. If theme
is None
, then assume it is 'light'. Then, if coloredge is not None
over ride the theme values.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point, although looking this over I think I could probably remove the coloredge kwarg since it's either going to be black (if using a light theme) or the candlestick body color (if using a dark theme).
We are looking for some to be responsible for maintenance of the finance module. |
I also don't see where the dark theme is implemented, sorry if I am being daft. |
Probably could do a better job with themes, but the dark theme is implemented in the actual in the script that calls the candlestick function. The reason for dark theme is because if you are using a black background (which a lot of people use nowadays for stock charts) then the the edge colors and shadows need to be set based on the color of the body. However, when using a light a theme, the shadows and edges of the body need to remain black. |
Sorry for the long silence. @jdgd1 Do you have any interest in continuing to work on this? The entire |
@tacaswell I would hate to see it removed, it's hands down the best financial charting module of any package out there. My free time has become less and less lately though, which is the only reason I'm hesitant to take on full responsibility for it. Lets chat about this later - i might be able to take it on. |
Not sure how I closed this. |
@jdgd1, is there still a possibility that you could become the finance module maintainer? This PR can be revived via a new PR, or maybe via rebasing against master and using force-push. I can't simply reopen it because it is presently based on a deleted branch. |
This attempts to give the user the option to choose a color for the edge of a candlestick body and the high-low bars (optional). If no argument is given the behavior is just like before. It also should fix the vertical line (high-low) zorder so its behind the candlestickbody now. Idea mainly by jdgd1. I tried to keep existing code working while adding the feature. matplotlib#3016 matplotlib#2546 Hopefully fixed the whitespaces.