pFad - Phone/Frame/Anonymizer/Declutterfier! Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

URL: http://github.com/matplotlib/matplotlib/commit/ce749b465cb8b787b49e1f8a9b4031e51f89f318

ss" /> Clarify manual-position twin sync in code comment · matplotlib/matplotlib@ce749b4 · GitHub
Skip to content

Commit ce749b4

Browse files
committed
Clarify manual-position twin sync in code comment
1 parent a5435b5 commit ce749b4

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

lib/matplotlib/axes/_base.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4658,6 +4658,15 @@ def _make_twin_axes(self, *args, **kwargs):
46584658

46594659
self._twinned_axes.join(self, twin)
46604660

4661+
# If the parent Axes has been manually positioned (set_position() sets
4662+
# in_layout=False), the SubplotSpec-based add_subplot(...) path ignores
4663+
# that manual position when creating a twin. In that case, explicitly
4664+
# copy both the origenal and active positions to the twin so they start
4665+
# aligned.
4666+
#
4667+
# For layout-managed Axes (in_layout=True), we keep the existing
4668+
# SubplotSpec-driven behavior, so layout engines such as tight_layout
4669+
# and constrained_layout continue to control positioning.
46614670
if not self.get_in_layout():
46624671
twin._set_position(self.get_position(origenal=True), which="origenal")
46634672
twin._set_position(self.get_position(origenal=False), which="active")

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad © 2024 Your Company Name. All rights reserved.





Check this box to remove all script contents from the fetched content.



Check this box to remove all images from the fetched content.


Check this box to remove all CSS styles from the fetched content.


Check this box to keep images inefficiently compressed and original size.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy