Skip to content

Colorbar redo again!#20501

Merged
jklymak merged 1 commit intomatplotlib:masterfrom
jklymak:colorbar-try3-justmod-transform
Jul 8, 2021
Merged

Colorbar redo again!#20501
jklymak merged 1 commit intomatplotlib:masterfrom
jklymak:colorbar-try3-justmod-transform

Conversation

@jklymak
Copy link
Copy Markdown
Member

@jklymak jklymak commented Jun 23, 2021

PR Summary

OK, third time is the charm.

Previous overhaul packaged an inner and outer axes in a container "ColorbarAxes" and tried to dispatch methods between them.

This overhaul takes the much simpler approach of resizing the image using a custom _axes_locator that a) calls any existing locator b) or just uses the axes default position. The custom _axes_locator then shrinks the axes in the appropriate direction to make room for extend tri/rectangles. As with the previous fix, the extend tri/rectangles are drawn as patches in axes co-ordinates, rather than pcolormesh in "data" co-ordinates.

This addresses the concerns and closes #20479

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).

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Release critical For bugs that make the library unusable (segfaults, incorrect plots, etc) and major regressions. topic: color/colorbar

Projects

None yet

Development

Successfully merging this pull request may close these issues.

matplotlib 3.5 breaks yt ColorbarAxes is an imperfect proxy for the Axes passed to Colorbar

5 participants