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

Skip to content

FIX: Better constrain CL for uneven grids #17387

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

Closed

Conversation

jklymak
Copy link
Member

@jklymak jklymak commented May 12, 2020

PR Summary

test_constrainedlayout.py::test_constrained_layout17 is a bit flakey because the constraints are poor. In general, constrained layout needs to be able to handle the situation below where the bottom axes is twice as large as the upper two, but the outer spines must be aligned.

CLIss0

However, it also has to work in the case where there are no inner spines to align:

CLIss1

This case was flakey before because I can only strong constrain the widths of the larger axes to be at least twice as large as the smaller. If there are also spines to line up, then this works fine, but in the second example above, it doesn't constrain the smaller axes from being any size smaller than twice the width of the bigger axes.

The change here is to introduce a 'weak' constraint that is ignored in the first case, and executed in the second case.

This is a follow up to #17306

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 12, 2020
@jklymak jklymak force-pushed the fix-CL-better-height-constraint branch from dda2052 to 27fd29b Compare May 12, 2020 16:02
@jklymak jklymak marked this pull request as draft May 14, 2020 16:28
@jklymak
Copy link
Member Author

jklymak commented May 20, 2020

Closing in favour of #17437

@jklymak jklymak closed this May 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic: geometry manager LayoutEngine, Constrained layout, Tight layout
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant