Dedicated artists for inset colorbars, centered-row legends #74
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Centered-row legends and inset colorbars are currently implemented on the Figure and Axes methods with
colorbar_wrapper
andlegend_wrapper
. But this means background patch tasks that would be carried out by theColorbar
andLegend
classes at draw-time have to be done during call-time.renderer
being used to position the "centered-legend" box changes betweenlegend()
call-time and draw-time.This PR will create dedicated classes for inset colorbars and centered-row legends so the background patch extent can be determined dynamically at draw-time.
Also, while starting this PR I learned about some intriguing matplotlib classes in the offsetbox module used to automatically position legend labels / text. The
HPacker
andVPacker
classes might be used to implement #46 / #50. Anchored artists might also be useful for both PRs.