Skip to content

Disable sticky edge accumulation if no autoscaling.#12547

Merged
dopplershift merged 1 commit into
matplotlib:masterfrom
QuLogic:disable-stickies-more
Oct 17, 2018
Merged

Disable sticky edge accumulation if no autoscaling.#12547
dopplershift merged 1 commit into
matplotlib:masterfrom
QuLogic:disable-stickies-more

Conversation

@QuLogic

@QuLogic QuLogic commented Oct 17, 2018

Copy link
Copy Markdown
Member

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

jklymak commented Oct 17, 2018

Copy link
Copy Markdown
Member

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

@QuLogic

QuLogic commented Oct 17, 2018

Copy link
Copy Markdown
Member Author

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