| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
|
It may not make sense to roll into this PR, but while you’re looking at this could you check the behavior of 3D axes as well? They have different pan/rotate/zoom handling. |
Sorry, something went wrong.
|
Sorry to disappoint you, but this PR is already going on for a very long time and I really like to get this merged in a reasonble time. Extending it with additional functionalities is unfortunately out of scope for me at the moment (also my experience with mpl3d is limited). |
Sorry, something went wrong.
|
The newly added methods/__init__ arguments should be added to the pyi stub file (with type hints, which I think are mostly just bool | Literal["auto"] here) |
Sorry, something went wrong.
|
@ksunden Stub-files are updated now! |
Sorry, something went wrong.
|
I think this largely works as desired/documented. My concern is that I think it is confusing that ax.patch.set_facecolor("none") behaves differently to ax.patch.set_visible(False) here... visually they are identical, but they differ in interactivity because the "auto" treatment checks patch.is_visible(). I'm not sure that that should be blocking, necessarily, but I do think that transparent axes are one of the most sensible cases for overlapping axes (along with things like insets, etc) and I'm not certain that people will have used set_visible rather than set_facecolor("none") And of course if we do decide to key off of the alpha value, we would need to decide what cutoff to use:
I would lean towards one of the first two, I think though not sure which one. (Under the assumption we want to key off of alpha in the first palace, which I'm not totally convinced of) |
Sorry, something went wrong.
|
@ksunden Thanks for taking a close look on the PR! Let me add my 2 cents to your concerns: In my opinion, the current implementation still seems the most intuitive... to clarify:
Considering the effects of transparency as an additional trigger for capturing behavior, I think it would add more confusion than it solves.
In 99% of the case, people will want axes that capture events. So even though less people use set_visible, the ones who want to temper with the capturing behavior will find it in the docs and all other users that only use set_facecolor("none") (or set_alpha(0)) do not interfere with the capturing behavior at all. |
Sorry, something went wrong.
| - ``True``: Forward navigation events to axes below. | ||
| - ``False``: Execute navigation events only on this axes. | ||
| - ``"auto"``: Use the default behaviour | ||
| (``True`` for axes with an invisible patch and ``False`` otherwise). |
There was a problem hiding this comment.
be explicit about what "invisible" means here (obj.set_visible(False))
Sorry, something went wrong.
There was a problem hiding this comment.
added a note on what is considered a "visible patch"
Sorry, something went wrong.
|
@tacaswell thanks for having a look at the PR! |
Sorry, something went wrong.
|
Do we have a theory as to why coverage looks wrong? Are we sure that the test is actually running on CI? |
Sorry, something went wrong.
|
@tacaswell thanks for the follow-up! Good point... I assumed that pytest grabs it just like any other test... however looking at codecov it seems that something strange is going on... The test itself is fully covered so I guess it was executed, but I can't really wrap my head around how it is even possible that the resulting coverage looks like this (in backend_bases.py here)...
I'll try to look into this as soon as I find some time! |
Sorry, something went wrong.
|
At least locally for me they are being discovered, but I can reproduce the lack of coverage. It looks like it only ever runs until the if len(axes): return [] fast-exit. |
Sorry, something went wrong.
|
Any update on this? |
Sorry, something went wrong.
|
Hey, sorry that I've disappeared after pushing for more speed on this... There were some things that kept me busy. |
Sorry, something went wrong.
|
No worries! For volunteers basically everything else in your life should take priority and we understand stuff comes up. |
Sorry, something went wrong.
|
@raphaelquast gentle ping as we are rounding up things for 3.9 |
Sorry, something went wrong.
|
Hey @ksunden, thanks for pinging. As I see it the only thing that holds this back is the mysterious unittests that somehow don't run as expected. I quickly did another check if I can reproduce this but unfortunately I really don't get why the tests are not showing the expected coverage. To clarify, I just did the following crude test to be absolutely sure the lines are covered locally on my side:
(mpl-dev) C:\Users\Admin\Projects\matplotlib\lib\matplotlib>python -m pytest tests -k test_interactive_pan_zoom_events -s ============================================================= test session starts ============================================================== platform win32 -- Python 3.11.6, pytest-7.4.2, pluggy-1.3.0 rootdir: C:\Users\Admin\Projects\matplotlib configfile: pytest.ini plugins: anyio-4.0.0, cov-4.1.0, rerunfailures-12.0, timeout-2.2.0, xdist-3.3.1 collected 9344 items / 9296 deselected / 2 skipped / 48 selected tests\test_backend_bases.py Found axes to trigger: [<Axes: label='ax_t_twin'>, <Axes: label='ax_t'>, <Axes: label='ax_b_twin'>, <Axes: label='ax_b'>] .Found axes to trigger: [<Axes: label='ax_t_twin'>, <Axes: label='ax_t'>, <Axes: label='ax_b_twin'>, <Axes: label='ax_b'>] .Found axes to trigger: [<Axes: label='ax_t_twin'>, <Axes: label='ax_t'>, <Axes: label='ax_b_twin'>, <Axes: label='ax_b'>] .Found axes to trigger: [<Axes: label='ax_t_twin'>, <Axes: label='ax_t'>, <Axes: label='ax_b_twin'>, <Axes: label='ax_b'>] .Found axes to trigger: [<Axes: label='ax_t_twin'>, <Axes: label='ax_t'>, <Axes: label='ax_b_twin'>, <Axes: label='ax_b'>] .Found axes to trigger: [<Axes: label='ax_t_twin'>, <Axes: label='ax_t'>, <Axes: label='ax_b_twin'>, <Axes: label='ax_b'>] .Found axes to trigger: [<Axes: label='ax_t_twin'>, <Axes: label='ax_t'>, <Axes: label='ax_b_twin'>, <Axes: label='ax_b'>] .Found axes to trigger: [<Axes: label='ax_t_twin'>, <Axes: label='ax_t'>, <Axes: label='ax_b_twin'>, <Axes: label='ax_b'>] .Found axes to trigger: [<Axes: label='ax_t_twin'>, <Axes: label='ax_t'>] .Found axes to trigger: [<Axes: label='ax_t_twin'>, <Axes: label='ax_t'>] .Found axes to trigger: [<Axes: label='ax_t_twin'>, <Axes: label='ax_t'>] .Found axes to trigger: [<Axes: label='ax_t_twin'>, <Axes: label='ax_t'>] .Found axes to trigger: [<Axes: label='ax_t_twin'>, <Axes: label='ax_t'>] .Found axes to trigger: [<Axes: label='ax_t_twin'>, <Axes: label='ax_t'>] .Found axes to trigger: [<Axes: label='ax_t_twin'>, <Axes: label='ax_t'>] .Found axes to trigger: [<Axes: label='ax_t_twin'>, <Axes: label='ax_t'>] .Found axes to trigger: [<Axes: label='ax_t_twin'>, <Axes: label='ax_t'>] .Found axes to trigger: [<Axes: label='ax_t_twin'>, <Axes: label='ax_t'>] .Found axes to trigger: [<Axes: label='ax_t_twin'>, <Axes: label='ax_t'>] .Found axes to trigger: [<Axes: label='ax_t_twin'>, <Axes: label='ax_t'>] .Found axes to trigger: [<Axes: label='ax_t_twin'>, <Axes: label='ax_t'>, <Axes: label='ax_b_twin'>, <Axes: label='ax_b'>] .Found axes to trigger: [<Axes: label='ax_t_twin'>, <Axes: label='ax_t'>, <Axes: label='ax_b_twin'>, <Axes: label='ax_b'>] .Found axes to trigger: [<Axes: label='ax_t_twin'>, <Axes: label='ax_t'>, <Axes: label='ax_b_twin'>, <Axes: label='ax_b'>] .Found axes to trigger: [<Axes: label='ax_t_twin'>, <Axes: label='ax_t'>, <Axes: label='ax_b_twin'>, <Axes: label='ax_b'>] .Found axes to trigger: [<Axes: label='ax_t'>, <Axes: label='ax_b'>] .Found axes to trigger: [<Axes: label='ax_t'>, <Axes: label='ax_b'>] .Found axes to trigger: [<Axes: label='ax_t'>, <Axes: label='ax_b'>] .Found axes to trigger: [<Axes: label='ax_t'>, <Axes: label='ax_b'>] .Found axes to trigger: [<Axes: label='ax_t'>, <Axes: label='ax_b'>] .Found axes to trigger: [<Axes: label='ax_t'>, <Axes: label='ax_b'>] .Found axes to trigger: [<Axes: label='ax_t'>, <Axes: label='ax_b'>] .Found axes to trigger: [<Axes: label='ax_t'>, <Axes: label='ax_b'>] .Found axes to trigger: [<Axes: label='ax_t'>] .Found axes to trigger: [<Axes: label='ax_t'>] .Found axes to trigger: [<Axes: label='ax_t'>] .Found axes to trigger: [<Axes: label='ax_t'>] .Found axes to trigger: [<Axes: label='ax_t'>] .Found axes to trigger: [<Axes: label='ax_t'>] .Found axes to trigger: [<Axes: label='ax_t'>] .Found axes to trigger: [<Axes: label='ax_t'>] .Found axes to trigger: [<Axes: label='ax_t'>] .Found axes to trigger: [<Axes: label='ax_t'>] .Found axes to trigger: [<Axes: label='ax_t'>] .Found axes to trigger: [<Axes: label='ax_t'>] .Found axes to trigger: [<Axes: label='ax_t'>, <Axes: label='ax_b'>] .Found axes to trigger: [<Axes: label='ax_t'>, <Axes: label='ax_b'>] .Found axes to trigger: [<Axes: label='ax_t'>, <Axes: label='ax_b'>] .Found axes to trigger: [<Axes: label='ax_t'>, <Axes: label='ax_b'>] . =============================================== 48 passed, 2 skipped, 9296 deselected in 26.49s ================================================ ... which is what I was expecting to get if the function was executed properly
|
Sorry, something went wrong.
I can't reproduce locally after a rebase to latest main (though I didn't try before the rebase); maybe that will help here? |
Sorry, something went wrong.
|
@QuLogic Thanks a lot for taking a look! I updated the branch to the latest main... let's see if that helps! |
Sorry, something went wrong.
Co-authored-by: Thomas A Caswell <tcaswell@gmail.com>
|
@QuLogic I rebased to the latest main but now the macOS_py311 test on azure is failing with the (I guess unrelated) error: |
Sorry, something went wrong.
|
It appears that someone re-ran that, as it seems to be passing now. The code coverage looks pretty good now; only the early returns are uncovered. |
Sorry, something went wrong.
|
OK perfect! But codecov/project/tests is still failing (even though all added/changed lines are covered)? |
Sorry, something went wrong.
Co-authored-by: Elliott Sales de Andrade <quantum.analyst@gmail.com>
|
GTK dll loading failures on appveyor appears to be unrelated, reproducible in other recent PRs. |
Sorry, something went wrong.
|
Thanks for your perseverance on this one, it was a long journey, but glad we got there! |
Sorry, something went wrong.
|
Awesome to see that this is finally merged! |
Sorry, something went wrong.
|
I hope we hear from you again @raphaelquast ! |
Sorry, something went wrong.
|
@tacaswell definitely! I do have a few things that I'd like to see implemented and I hope that I find some time to contribute! |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Followup for #22347