Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

finance ochl->ohlc#1920

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
dmcdougall merged 29 commits intomatplotlib:masterfromtacaswell:ochl_to_ohlc
Aug 17, 2013
Merged

Conversation

tacaswell
Copy link
Member

Implemented wrapper layer to merge in changes from PR#1783

@@ -26,6 +26,7 @@
from matplotlib.patches import Rectangle
from matplotlib.transforms import Affine2D

from matplotlib import MatplotlibDeprecationWarning as mplDeprecation
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

it is best to import this from the cbook module.

@tacaswell
Copy link
MemberAuthor

I will get to the documentation changes later.

@@ -486,46 +532,48 @@ def candlestick2(ax, opens, closes, highs, lows, width=4,
return value is lineCollection, barCollection
"""

# note this code assumes if any value open,close,low, high is
# note this code assumes if any value open, low, high, close is
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Don't you want this comment to use the order open, high, low, close?

@tacaswell
Copy link
MemberAuthor

Still haven't gotten to the documentation changes. I've been kinda crazy the last month or so.

@NelleV It looks like none of the functions in this file are the numpy style, should I do just the functions I touched, or would it be better to make a different PR with all of the documentation fixed?

@tacaswell
Copy link
MemberAuthor

@mdboom This is a API change and should probably go in 1.3 if it is going to go in.

@mdboom
Copy link
Member

@tacaswell: Thanks. It should get an entry inwhats_new andapi_changes and a test (probably doesn't need an image comparison test) and then I think it's good to go.

@tacaswell
Copy link
MemberAuthor

Going over this again last night I noticed some additional subtle api changes that I had missed before. The expected order of elements a nested sequence are also changed from [(d, open, close, high, low, ...), ...] -> [(d, open, high, low, close, ...), ...]. This affects the return values of the yahoo related functions and any of the functions that takequotes as an argument. Should all of these functions have*_ochl and*_ohlc versions created as well?

What sort of test should this get if not an image comparison? I don't think anything in this file is currently tested in anyway.

@tacaswell
Copy link
MemberAuthor

need to merge PR#2077 into this branch

(mostly a note to my self so I can find it again later)

@tacaswell
Copy link
MemberAuthor

Now that I have touched basically every function in this module, what tests should I add?

Should I smash most of these commits down to one?

@NelleV How should I deal with the very long URL on line 395?

@NelleV
Copy link
Member

@NelleVhttps://github.com/NelleV How should I deal with the very long
URL on line 395?

It seem to be a string, hence you can split it as you would split a string:
urlname = ("blah" +
"blah")

or
urlname = ("blah"
"blah")

there has been discussion on python-dev on removing the latter, so I would
go with the splitting with the + sign.


Reply to this email directly or view it on GitHubhttps://github.com//pull/1920#issuecomment-18661681
.

@tacaswell
Copy link
MemberAuthor

@dmcdougall Now that things have calmed down a bit can this get some attention?

@@ -26,6 +29,7 @@
from matplotlib.patches import Rectangle
from matplotlib.transforms import Affine2D

from cbook import mplDeprecation
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Nitpick: can you please use explicit imports?from .cbook import mplDeprecation

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

(Or absolute imports)

@efiring
Copy link
Member

I don't want to interfere with all the work that has gone into trying to straighten out this module, but it raises a larger question: should such a specialized module even be part of the mpl core distribution? I think the answer is clearly "no". It should be in an external toolkit, or an example, or a cookbook, but it should not be accessible via "from matplotlib import ...".

Changes in 1.4.x
================

* In :module:`~matplotlib.finance`, almost all functions have beeen depreciated and
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

depreciated ->deprecated

@mdboom
Copy link
Member

In response to@efiring: I agree, this is highly specialized, and long term should probably be (at least) be moved tompl_toolkits, or even better to its own independent project. But there are a lot of other things in matplotlib in that boat and I'd rather devise a plan for outward migration that works well for all such things. I don't think we should let that hold up this pull request which is valuable improvement in any event.

@tacaswell: Can you rebase so that the diff is clean again and we can go through for a (hopefully last) round of reviews?

@tacaswell
Copy link
MemberAuthor

Currently traveling, I will get to this over the weekend.

I have no protest to this getting pulled out.

Tom
On Jul 16, 2013 5:22 PM, "Michael Droettboom"notifications@github.com
wrote:

In response to@efiringhttps://github.com/efiring: I agree, this is
highly specialized, and long term should probably be (at least) be moved to
mpl_toolkits, or even better to its own independent project. But there
are a lot of other things in matplotlib in that boat and I'd rather devise
a plan for outward migration that works well for all such things. I don't
think we should let that hold up this pull request which is valuable
improvement in any event.

@tacaswellhttps://github.com/tacaswell: Can you rebase so that the
diff is clean again and we can go through for a (hopefully last) round of
reviews?


Reply to this email directly or view it on GitHubhttps://github.com//pull/1920#issuecomment-21074865
.

kramer650and others added5 commitsJuly 21, 2013 16:31
In the financial world, a bar-chart is commonly called an OHLC-chart or "Open-High-Low-Close chart". Also seehttp://en.wikipedia.org/wiki/Open-high-low-close_chart or simply google around.To my surprise this library uses a sequence of OCHL instead of OHLC. Although it changes the API, I found it important to comply with financial industry standards. This makes it easier to implement this library in existing financial software and thus more likely to be used in the future.
Added deprecation warning to `plot_day_summary2` and returned callsignature to what it was.Added alias `plot_day_summary_ochl` with same call signature as`plot_day_summary2`.renamed the modified function to `plot_day_summary_ohlc`.The first two functions simply call the third with the argumentsre-ordered.
@tacaswell
Copy link
MemberAuthor

I don't understand the errors coming out of travis, two of them look likeAttributeErrors coming out of nose and the third is a font issue.

@mdboom
Copy link
Member

👍 from me. Thanks for all of your hard work on this!

@tacaswell
Copy link
MemberAuthor

The travis failures are unrelated, because this module has no test coverage.

@tacaswell
Copy link
MemberAuthor

As near as I can tell, the documentation for this module is not generated by sphinx.

I added it to the api list, but this seems at cross purposes to pulling this module out ofmatplotlib proper.

@mdboom
Copy link
Member

I think as long as it's in matplotlib, it should probably be in the documentation. Maybe just add a module-level docstring (which would also appear in the HTML docs), that says this module is deprecated?

dmcdougall added a commit that referenced this pull requestAug 17, 2013
@dmcdougalldmcdougall merged commit17216bb intomatplotlib:masterAug 17, 2013
@tacaswelltacaswell deleted the ochl_to_ohlc branchSeptember 11, 2013 15:20
tacaswell added a commit to tacaswell/matplotlib that referenced this pull requestJan 10, 2015
tacaswell added a commit to tacaswell/matplotlib that referenced this pull requestJan 22, 2015
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers
No reviews
Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

7 participants
@tacaswell@mdboom@NelleV@efiring@WeatherGod@dmcdougall@kramer650

[8]ページ先頭

©2009-2025 Movatter.jp