Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Colorbars/legends spanning arbitrary contiguous subplots #329

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

Open
lukelbd opened this issue Jan 27, 2022 · 0 comments
Open

Colorbars/legends spanning arbitrary contiguous subplots #329

lukelbd opened this issue Jan 27, 2022 · 0 comments
Labels

Comments

@lukelbd
Copy link
Collaborator

lukelbd commented Jan 27, 2022

In an upcoming version I'd like to support "outer" colorbars and legends spanning arbitrary contiguous subplots -- not just "figure-wide" colorbars along the figure edge. Here's a matplotlib example from this page (the top-left colorbar is what I'm thinking of... except as before, proplot would preserve colorbar widths and subplot aspect ratios):

tmp

This shouldn't be too hard to implement, and will have the benefit of unifying the clunky internal implementation of "axes-type" and "figure-type" colorbars and legends.

This is also an area where SubplotGrid could really start to shine -- similar to SubplotGrid.format, which calls figure.format(axs=axs) using the axes in the grid, I can implement SubplotGrid.colorbar and SubplotGrid.legend that respectively call figure.colorbar(axs=axs) and figure.legend(axs=axs). This would be really succinct and intuitive -- for example, if someone has a 2-row, 3-column figure, then to draw a bottom colorbar spanning the top and bottom rows, the syntax would be axs[0, :].colorbar(m, loc='bottom') followed by axs[1, :].colorbar(loc='bottom').

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant