Skip to content
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

Allow wt.artists.create_figure() hspace and wspace arguments to accept lists/arrays #1130

Open
DLafayetteII opened this issue Jun 28, 2023 · 2 comments

Comments

@DLafayetteII
Copy link
Contributor

DLafayetteII commented Jun 28, 2023

Optimal spacing between subplots may differ within one figure depending on axes labels and tick label widths. A common example of this difference in preferred spacing is that the colorbar may not require the same spacing from the adjacent subplots as the subplots need from each other:
cbar_spacing_example

Current implementation only allows for one consistent height (or width) spacing between all subplots of a figure. Enabling wt.artists.create_figure() to accept a 1D list of values for hspace and wspace would enhance figure generation.

@DLafayetteII
Copy link
Contributor Author

For anyone interested in circumventing this limitation in the mean time, @ddkohler suggested making spacing minimal, say wspace = 0, and then using thin subplot columns, i.e. col = [1, 0.05, 1, cbar] where you do want spacing. There may be games to play with the aspect ratio argument as well (haven't thought that far).

@DLafayetteII
Copy link
Contributor Author

Looks like we are currently dependent on matplotlib.gridspec.Gridspec, which does not accept a list nor array of wspace/hspace.

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

No branches or pull requests

1 participant