Skip to content

Conversation

jklymak
Copy link
Member

@jklymak jklymak commented May 17, 2020

PR Summary

Just a draft for now, but this is meant to be substantially simpler than the current constrained_layout and more robust. Some of the flakiness should be gone. Colorbars are better located, and respect their anchors now.

This version includes the idea of figure.sub_panels, but that could be (reluctantly) taken out if its deemed not useful. It does get you nice things like:

SubpanelExample

It wold have been nice to do them separately but it was pretty hard to make sure everything works for the nesting....

Most of the constrained_layout baseline images have changed, but thats because colorbar sizing has changed (for the better), and small changes to how padding is handled. I don't feel any of the choices made here make any of the images worse, and I don't think its worth trying to make them the same. I could be convinced to change a lot of these to assertions on the position of the axes, but its then a challenge to see what goes wrong if they break.

  • check colorbar aspect
  • tests for subpanel...
  • modify tutorial and docstring
  • add tutorial for subpanel.
    • modify transform tutorial

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

@jklymak jklymak added the topic: geometry manager LayoutEngine, Constrained layout, Tight layout label May 17, 2020
@jklymak jklymak added this to the v3.4.0 milestone May 17, 2020
@jklymak
Copy link
Member Author

jklymak commented May 21, 2020

Rebasing for this is going to be a big PITA because I have so much re-organization in figure.py. That re-org is because I've re-introduced subpanel here. Maybe we should have some comment on whether that has any chance of going in before I tear my hair out trying to keep it all synced. See the new example subpanels.py for how this feature works.

https://37230-1385122-gh.circle-artifacts.com/0/doc/build/html/gallery/subplots_axes_and_figures/subpanels.html#sphx-glr-gallery-subplots-axes-and-figures-subpanels-py

@jklymak jklymak added the status: needs comment/discussion needs consensus on next step label May 21, 2020
@jklymak
Copy link
Member Author

jklymak commented May 23, 2020

Closing this for now in lieu of #17494 which doesn't have any of the changes to figure and subpanel.

@jklymak jklymak closed this May 23, 2020
@jklymak jklymak mentioned this pull request May 29, 2020
6 tasks
@tacaswell tacaswell modified the milestones: v3.4.0, unassigned Jun 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: needs comment/discussion needs consensus on next step topic: geometry manager LayoutEngine, Constrained layout, Tight layout
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants