Doc: Fix Patheditor example - #11431
Conversation
anntzer
left a comment
There was a problem hiding this comment.
I can't manage to trigger any error with the example as it is right now, and removing the blit line makes the example not work anymore on tkagg for me.
Anyone can dismiss the review if this problem is sorted out.
|
This is the race condition that just keeps giving.... |
|
For me (linux/py3/tkagg), removing the line causes nothing to happen at all when attempting to drag a point. |
|
Any conclusion? Should I better close this and open an issue about it? |
|
I think leaving this open is just as good as opening a separate issue. |
|
Just marking as "Needs revision" so folks don't click on this as a PR that needs review, not as a spur to action.... |
|
Keeping this as an unfinished/dead PR will probably rather cause confusion once someone revisists this in the future. So, I guess I will open an issue about it one of those days. It's currently not clear (to me) why there is even a difference between the examples being run on windows and linux and this might well point towards a bigger underlying problem. |
|
I cannot reproduce any error with Qt5Agg using current |
|
I cannot reproduce the error either with:
@ImportanceOfBeingErnest can you test on a more recent version yourself? Otherwise I propose to close this assuming fixed tue to @QuLogic and me not being able to reproduce it. |
|
The issue is still present. matplotlib/examples/event_handling/poly_editor.py Lines 88 to 90 in 2d4fcc7 |
|
No wait. This is actually fixed by #16028 |
|
Actually in my hands the path_editor example now also works on tkagg without the blit; if others can confirm that perhaps we can just remove it. |

PR Summary
The path editor example errors when being run with an interactive backend, due to a recursion in drawing the elements.
This PR fixes this issue by not blitting inside the draw_event (because that happens before the screen update anyways).