Skip to content

Conversation

greglucas
Copy link
Contributor

PR Summary

The bottom and top alignments were incorrectly defined before, this updates them to have the expected alignment.

closes #24386

PR Checklist

Documentation and Tests

  • Has pytest style unit tests (and pytest passes)
  • Documentation is sphinx and numpydoc compliant (the docs should build without error).
  • [N/A] New plotting related features are documented with examples.

Release Notes

  • [N/A] New features are marked with a .. versionadded:: directive in the docstring and documented in doc/users/next_whats_new/
  • [N/A] API changes are marked with a .. versionchanged:: directive in the docstring and documented in doc/api/next_api_changes/
  • Release notes conform with instructions in next_whats_new/README.rst or next_api_changes/README.rst

@greglucas greglucas added the PR: bugfix Pull requests that fix identified bugs label Nov 30, 2022
@greglucas greglucas added this to the v3.7.0 milestone Nov 30, 2022
elif align == "center":
y_height = (y2 - y1) / 2
# x-offsets, y-offsets
assert_allclose([(0, y_height), (x1, 0)], extents[-1])
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
assert_allclose([(0, y_height), (x1, 0)], extents[-1])
assert_allclose([(0, y_height), (x1, 0)], offset_pairs)

The bottom and top alignments were incorrectly defined before,
this updates them to have the expected alignment.
@jklymak
Copy link
Member

jklymak commented Nov 30, 2022

Anyone should merge when CI is done...

@ksunden ksunden merged commit 116ace5 into matplotlib:main Dec 1, 2022
@greglucas greglucas deleted the packer-align branch December 1, 2022 04:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PR: bugfix Pull requests that fix identified bugs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: align in HPacker is reversed
5 participants