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
Filling correction for Fillbetweenitem #2971
Filling correction for Fillbetweenitem #2971
Conversation
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.
Thanks for the PR @BousquetSophie ! FillBetweenItem doesn't get as much attention as it should.
The only comment I had is regarding the use of lineTo; I won't let that be a deal breaker, but if you could implement a fix without having moveTo/lineTo that would be preferred.
Thanks for the PR @BousquetSophie Merging! |
Hi, this started causing problems for us when filling between two non-convex curves that are not closed (basically, an area chart) . The intersected() function closes the curves and creates an additional undesired area. |
Would it be sufficient to restrict this logic to closed polygons?
|
Sorry about that! I think restricting to closed polygons would indeed be a sufficient solution. |
Can you verify that #3006 fixes your issue? |
Sure, that one works too. |
Hey, sorry to ask you again, would you mind trying that branch again? I just made another update to it (that will better satisfy #1698) but it may have some downstream consequences. If FillBetweenItem is working as expected, I'll likely do another release with the FillBetweenItem regression fix. |
This one breaks it again for us, this time producing a stray line crossing the whole chart. |
Really appreciate you checking, if you have an example I can run (doesn't have to be a minimum reproducible example), I'll gladly check that while trying to come up w/ a solution to #1698 so I don't have to bug you each time I try something new 😆 |
Sure, I believe this one illustrates the problems well
|
In the original, the "stray line" is in fact the two triangles at the bottom, just stretched. |
ahh god it, I'm being daft.. my apologies. Alright, I'm getting to work 👍🏻 |
Allow users to specify FillRule for FillBetweenItem, undo regressionfrom #2971
@jmakovicka Released 0.13.7, which includes a fix to the regression I shipped. Also added a Thanks for your prompt report on the breakage. |
Detail the reasoning behind the code change. If there is an associated issue that this PR will resolve add
Fixes #1698 When we have 2 intersecting polygons, there's no more fill at the intersection.
So, we've extracted the intersection points and used them to create a new polygon to fill the empty space.
Other Tasks
Bump Dependency Versions
ubuntu 22.04
python 3.10.12
Pyqtgraph 0.13.4.dev0
Files that need updates
Confirm the following files have been either updated or there has been a determination that no update is needed.
README.md
setup.py
tox.ini
.github/workflows/main.yml
and associatedrequirements.txt
and condaenvironemt.yml
filespyproject.toml
binder/requirements.txt
Pre-Release Checklist
Pre Release Checklist
__init__.py
CHANGELOG
primarily using contents from automated changelog generation in GitHub release pagePost-Release Checklist
Steps To Complete
.dev0
to__version__
in__init__.py