Skip to content

Modified 'candlestick' function in response to request #2546 - #3016

Closed
jdgd1 wants to merge 1 commit into
matplotlib:v1.3.xfrom
jdgd1:patch-1
Closed

jdgd1 wants to merge 1 commit into
matplotlib:v1.3.xfrom
jdgd1:patch-1

Conversation

@jdgd1

@jdgd1 jdgd1 commented Apr 28, 2014

Copy link
Copy Markdown
  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

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
Comment thread lib/matplotlib/finance.py

Copy link
Copy Markdown
Member

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.

Copy link
Copy Markdown
Author

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).

@tacaswell

Copy link
Copy Markdown
Member

We are looking for some to be responsible for maintenance of the finance module.

@tacaswell tacaswell added this to the v1.4.x milestone Apr 28, 2014
@tacaswell

Copy link
Copy Markdown
Member

I also don't see where the dark theme is implemented, sorry if I am being daft.

@jdgd1

jdgd1 commented Apr 28, 2014

Copy link
Copy Markdown
Author

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.

@tacaswell

Copy link
Copy Markdown
Member

Sorry for the long silence.

@jdgd1 Do you have any interest in continuing to work on this? The entire finance module is slated for removal in the next release, do you want to adopt it?

@jdgd1

jdgd1 commented Oct 20, 2014

Copy link
Copy Markdown
Author

@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.

@tacaswell tacaswell closed this Nov 1, 2014
@tacaswell

Copy link
Copy Markdown
Member

Not sure how I closed this.

@efiring

efiring commented Sep 28, 2015

Copy link
Copy Markdown
Member

@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.

lifetime42 added a commit to lifetime42/matplotlib that referenced this pull request Oct 1, 2015
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants