Skip to content

FIX: Don't subslice lines if non-standard transform #21017

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

Merged
merged 2 commits into from
Sep 9, 2021

Conversation

jklymak
Copy link
Member

@jklymak jklymak commented Sep 8, 2021

PR Summary

Line2D objects are "sub sliced" if they are well-ordered, and their view window is smaller than the actual data extents. However, if someone applies a transform, in particular a lateral translation, then the data all ends up out of view. This adds a check to only apply the subslice algorithm if the transform is ax.transData.

Closes #21008

PR Checklist

  • Has pytest style unit tests (and pytest passes).
  • Is Flake 8 compliant (run flake8 on changed files to check).
  • New features are documented, with examples if plot related.
  • Documentation is sphinx and numpydoc compliant (the docs should build without error).
  • Conforms to Matplotlib style conventions (install flake8-docstrings and run flake8 --docstring-convention=all).
  • New features have an entry in doc/users/next_whats_new/ (follow instructions in README.rst there).
  • API changes documented in doc/api/next_api_changes/ (follow instructions in README.rst there).

@jklymak jklymak added this to the v3.4.4 milestone Sep 8, 2021
@jklymak jklymak force-pushed the fix-no-subslice-transform branch from 7ff497c to 7c3147b Compare September 8, 2021 07:15
Copy link
Contributor

@anntzer anntzer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A test would be nice, but I won't insist on it (I assume that you verified locally that it works :-))

@jklymak
Copy link
Member Author

jklymak commented Sep 8, 2021

No I'll add a test. Just was interrupted.

@jklymak jklymak force-pushed the fix-no-subslice-transform branch from e1ca3e7 to 391cb76 Compare September 8, 2021 11:55
@jklymak
Copy link
Member Author

jklymak commented Sep 8, 2021

New commit adds a test that fails on master with all the data sliced out, and is fine with this PR.

@jklymak jklymak force-pushed the fix-no-subslice-transform branch from 391cb76 to eba5cdc Compare September 8, 2021 12:01
@jklymak jklymak changed the title FIX: Don't subslice lines if non-standar transform FIX: Don't subslice lines if non-standard transform Sep 8, 2021
@timhoffm timhoffm merged commit b9ea8ce into matplotlib:master Sep 9, 2021
meeseeksmachine pushed a commit to meeseeksmachine/matplotlib that referenced this pull request Sep 9, 2021
meeseeksmachine pushed a commit to meeseeksmachine/matplotlib that referenced this pull request Sep 9, 2021
QuLogic added a commit that referenced this pull request Sep 9, 2021
…017-on-v3.5.x

Backport PR #21017 on branch v3.5.x (FIX: Don't subslice lines if non-standard transform)
QuLogic added a commit that referenced this pull request Sep 10, 2021
…017-on-v3.4.x

Backport PR #21017 on branch v3.4.x (FIX: Don't subslice lines if non-standard transform)
tacaswell pushed a commit that referenced this pull request Oct 20, 2021
FIX: Don't subslice lines if non-standard transform
@QuLogic QuLogic modified the milestones: v3.4.4, v3.5.0 Nov 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: transform keyword in ax.plot(...)
5 participants