Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
Fillbetween #6560
Conversation
mdboom
added the
needs_review
label
Jun 8, 2016
|
You targeted the right branch. If merged, this will ship with 2.1 at the earliest. |
tacaswell
commented on an outdated diff
Jun 8, 2016
|
Can you add an entry in |
tacaswell
added this to the
2.1 (next point release)
milestone
Jun 8, 2016
|
What is the problem here? I can't see the indicated errors.
|
|
That is odd that it is reporting lines outside of where you touched. This may be due to a bad merge somewhere else? |
|
|
|
There is once again a flake failure, in a line that is not part of the diff - 4908 (and I have already configured the editor to remove trailing spaces on write). There is an unrelated test failing as well at the image comparison: What should I do? |
QuLogic
commented on an outdated diff
Jun 9, 2016
| @@ -0,0 +1,7 @@ | ||
| +Interpolation in fill_betweenx | ||
| +------------------------------ | ||
| + | ||
| +The ``interpolate`` parameter now exists for the method :func:`fill_betweenx`. This allows | ||
| +a user to interpolate the data and fill the areas in the crossover points, similarly to :func:`fill_between`. | ||
| +:: |
QuLogic
Member
|
QuLogic
commented on an outdated diff
Jun 9, 2016
| @@ -4940,12 +4947,36 @@ def fill_betweenx(self, y, x1, x2=0, where=None, | ||
| N = len(yslice) | ||
| Y = np.zeros((2 * N + 2, 2), np.float) | ||
| + if interpolate: | ||
| + def get_interp_point(ind): | ||
| + im1 = max(ind - 1, 0) | ||
| + y_values = y[im1:ind + 1] | ||
| + diff_values = x1[im1:ind + 1] - x2[im1:ind + 1] | ||
| + x1_values = x1[im1:ind + 1] | ||
| + | ||
| + if len(diff_values) == 2: | ||
| + if np.ma.is_masked(diff_values[1]): |
|
|
That comes and goes; you can ignore it. |
|
I will implement the tests for |
|
@tacaswell I was just wondering, since this is such a trivial change, why not merge this before 2.1? Would it make a difference if the test coverage increased? |
|
This is a new feature and 2.1 is the next release with planned new features. The 1.5.x series is only getting critical (as in fixing regressions / does not compile / show stopper) bug fixes, and the 2.x series is only getting changes needed to get the style updates out the door. This seems to need a rebase. |
|
ping @rmlopes can you rebase this? |
tacaswell
added needs_revision and removed needs_review
labels
Jul 12, 2016
|
@tacaswell I rebased by squashing every commit into the first, then forced the push as the history is incompatible. Looks like this may not have been the correct approach though. |
|
You now need to rebase that single commit onto current master and force-push again. |
|
Should be ok now. |
tacaswell
added needs_review and removed needs_revision
labels
Jul 13, 2016
|
Something went wrong here, htere should not be this many commits. See http://matplotlib.org/devdocs/devel/gitwash/development_workflow.html?highlight=rebase#rebasing-a-pull-request-pr |
NelleV
reviewed
Oct 29, 2016
Overall, this looks good.
I've added a comment, but I think this PR has been going on for so long that we should merge it and do the maintenance in another PR.
| - Y = np.zeros((2 * N + 2, 2), float) | ||
| + Y = np.zeros((2 * N + 2, 2), np.float) | ||
| + if interpolate: | ||
| + def get_interp_point(ind): |
NelleV
Oct 29, 2016
Contributor
Is this the exact same function as in fill_between?
If so, I think it should be factored out and moved to the cbook module as a private function.
rmlopes
Nov 1, 2016
•
Contributor
I think so. I thought about that but also about using some interpolation function maintained and alerady available in scipy (would this be a bad idea perhaps?). I'll have a look at it as soon as I can.
NelleV
Nov 1, 2016
Contributor
scipy isn't a dependency, so using their functions isn't an option unless you copy paste them in a module of ours.
rmlopes
Nov 1, 2016
Contributor
The two methods differ on the axes of interpolation only. Could be a single function indeed. I can make this in a new branch but I need to know where to add the interpolate function.
This solution is actually very slow for my use case since I am displaying a few thousand seismic traces, so I would like to keep working on this.
|
Can you amend the commit and edit the commit message to remove the duplicate information and the comments from git? |
NelleV
changed the title from
Fillbetween to [MRG+1] Fillbetween
Oct 29, 2016
|
I did a rebase squashing 2 commits but somehow ended up with three commits. |
|
Thanks @rmlopes ! I'll merge this as soon as the tests have passed. |
| +Interpolation in fill_betweenx | ||
| +------------------------------ | ||
| + | ||
| +The ``interpolate`` parameter now exists for the method :func:`fill_betweenx`. |
QuLogic
Nov 1, 2016
Member
It's a method on a class, not a function, so will this cross-reference work?
| """ | ||
| Make filled polygons between two horizontal curves. | ||
| + Call signature:: |
|
On 2016/11/01 10:10 AM, Rui Lopes wrote:
Yes, there should be some scope for vectorization here. At the very |
|
I'll merge this, but @rmlopes feel free to continue working on this and open a new PR! |
NelleV
merged commit 3ff9fa8
into matplotlib:master
Nov 5, 2016
QuLogic
changed the title from
[MRG+1] Fillbetween to Fillbetween
Nov 5, 2016
QuLogic
removed the
needs_review
label
Nov 24, 2016
dopplershift
referenced
this pull request
in Unidata/MetPy
Dec 9, 2016
Open
skew.ax.fill_betweenx shading not shading entire region #69
dopplershift
added a commit
to dopplershift/MetPy
that referenced
this pull request
Apr 17, 2017
|
|
dopplershift |
e9a78af
|
rmlopes commentedJun 8, 2016
•
edited
As discussed in issue #6543. Added the interpolate argument just before the
**kwargs.I think I made a mistake, I wanted to target the 1.5.x. I'll be waiting for some input. :)
Should I edit the changelog as well?