Skip to content

Disable sticky edge accumulation if no autoscaling. #12547

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 1 commit into from
Oct 17, 2018

Conversation

QuLogic
Copy link
Member

@QuLogic QuLogic commented Oct 17, 2018

PR Summary

If there's no margin to be added, we don't need sticky edges, but if autoscaling is off, we also don't need the sticky edges. This saves a lot of time when plotting many artists, like in #12542.

Note this doesn't fix the problem in #12542, it just helps if you've already disabled autoscale as in #12542 (comment) in that you don't need to disable sticky edges yourself as well.

PR Checklist

  • Has Pytest style unit tests
  • Code is Flake 8 compliant
  • New features are documented, with examples if plot related
  • Documentation is sphinx and numpydoc compliant
  • Added an entry to doc/users/next_whats_new/ if major new feature (follow instructions in README.rst there)
  • Documented in doc/api/api_changes.rst if API changed in a backward-incompatible way

If there's no margin to be added, we don't need sticky edges, but if
autoscaling is off, we _also_ don't need the sticky edges. This saves a
lot of time when plotting many artists, like in matplotlib#12542.
@jklymak
Copy link
Member

jklymak commented Oct 17, 2018

I've never looked at this part of the code - what happens if the user turns autoscale on after the artists are added?

@QuLogic
Copy link
Member Author

QuLogic commented Oct 17, 2018

Nothing different from before. This list is just used in the helper function below, which returns early in the cases just added to the condition.

@tacaswell tacaswell added this to the v3.1 milestone Oct 17, 2018
@dopplershift dopplershift merged commit a2d2b80 into matplotlib:master Oct 17, 2018
@QuLogic QuLogic deleted the disable-stickies-more branch October 17, 2018 21:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants