-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
candlestick edgecolor #5160
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
candlestick edgecolor #5160
Conversation
This attempts to give the user the option to choose a color for the edge of a candlestick (optional). If no argument is given the behavior is like before. It also should fix the vertical line (for high-low) zorder so its behind the candlestickbody now.
The failures are all PEP8, mostly whitespace, plus some overly long lines. |
@@ -682,6 +682,8 @@ def candlestick_ochl(ax, quotes, width=0.2, colorup='k', colordown='r', | |||
the color of the rectangle where close < open | |||
alpha : float | |||
the rectangle alpha level | |||
coloregde : color (optional) |
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.
typo -> coloredge
attn: @jdgd1 |
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.
Sorry, fixed the typos and whitespaces(hopefully). |
Hopefully whitespaces now fixed
shouldn't we be calling this "edgecolor" in order to follow existing mpl nomenclature? |
👍 To matching the naming convention. |
I suggest a small change to the zorder strategy here. The basic point is that the patch should go above the line instead of below. Since the two go together, however, they should have similar zorders so that the user can easily plot a line (default zorder 2) that lands on top of both or below both. Furthermore, one wants both candlestick zorders to be above the default patch zorder (1), so that the candlesticks will appear on top of bar plots and the like. Two options for the zorders of the candlestick components:
|
I recommend option 2 above. I'm guessing that the use case would be to plot something like a scaled stock index as a line or symbols together with the candlestick plot, and that in such a case the index line is a background, and will look best behind the candlesticks. @lifetime42, do you agree, and if so are you available to make that change? It would be nice to get this resolved and merged. |
I think having the average in front or in the back depends on wether the 2016-05-22 1:36 GMT+02:00 Eric Firing notifications@github.com:
|
On 2016/05/23 11:36 AM, lifetime42 wrote:
Thanks. It's just a question of which is likely to be most common, |
The default should be to have the indicators in the front. 2016-05-23 23:58 GMT+02:00 Eric Firing notifications@github.com:
|
matplotlib.finance is no more (it has been moved to an external library, mpl_finance: https://github.com/matplotlib/mpl_finance). Feel free to reopen the PR in that repo. |
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.
#3016
#2546