Fix relim() ignoring scatter PathCollection offsets#31128
Fix relim() ignoring scatter PathCollection offsets#31128ksunden merged 3 commits intomatplotlib:mainfrom
Conversation
|
Adding Edit: It may be much more complicated than this. Since we have the option |
|
@Archiljain thanks for the contribution so far. As the topic is more involved, we cannot do a standalone solution without tackling a mechanism that makes inclusion of Artists in autoscaling optional. Following up on my previous note regarding entanglement of Collection limits considered in relim() and optional inclusion in autoscaling, I think the way forward is this:
|
|
Thanks for the clarification. I'm happy to work on PR1 (implementing the private set_in_autoscale mechanism) as a first step if that helps move this forward. Please let me know if that’s the preferred direction. |
|
@Archiljain you are welcome to work on this. Please read the full discussion in #15595 and use for context, in particular #15595 (comment). Since this is internal for now, naming is not too critical. I would stick to the in_autoscale terminology for now. But we may come up with a better name. |
|
I propose introducing a private Artist-level _in_autoscale flag (mirroring _in_layout), checked centrally in Axes.relim() to gate whether an artist contributes to data limits. No behavior change yet. |
|
Thanks for the guidance. I see that this needs a more foundational change. |
|
This should be re-done in a new PR; #31166 contained these commits so GitHub marked it as merged, but it also reverted all these changes, so they haven't actually landed in |
|
I'm planning to apply for GSoC this year and would love to continue contributing to autoscaling improvements. Are there related issues where help would be valuable? |
PR: matplotlib#31128 Issue: matplotlib#30859 Base commit: 08fe8bc Changed lines: 33
Fixes issue where
ax.relim()does not update limits after scatteroffsets are changed via
set_offsets().Adds handling for
Collectionartists inAxes.relim()byupdating data limits from collection offsets.
Includes a regression test to verify that axis limits update
correctly after scatter data changes.
Closes #30859