Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 804bd66

Browse filesBrowse files
committed
Fix test related to sharing
1 parent c88fedb commit 804bd66
Copy full SHA for 804bd66

File tree

Expand file treeCollapse file tree

2 files changed

+5
-4
lines changed
Filter options
Expand file treeCollapse file tree

2 files changed

+5
-4
lines changed

‎lib/matplotlib/axes/_base.py

Copy file name to clipboardExpand all lines: lib/matplotlib/axes/_base.py
+2-3Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1336,8 +1336,7 @@ def set_aspect(self, aspect, adjustable=None, anchor=None, share=False):
13361336
and aspect in ('equal', 'auto')):
13371337
aspect = float(aspect) # raise ValueError if necessary
13381338
if share:
1339-
axes = set(self._shared_x_axes.get_siblings(self)
1340-
+ self._shared_y_axes.get_siblings(self))
1339+
axes = set(self._shared_x_axes | self._shared_y_axes)
13411340
else:
13421341
axes = [self]
13431342
for ax in axes:
@@ -4308,7 +4307,7 @@ def _share_axes(self, axes, shared_axes):
43084307

43094308
for ax in shared:
43104309
setattr(ax, shared_axes, shared)
4311-
ax._adjustable = 'datalim'
4310+
# ax._adjustable = 'datalim'
43124311

43134312
def share_x_axes(self, axes):
43144313
"""

‎lib/matplotlib/tests/test_subplots.py

Copy file name to clipboardExpand all lines: lib/matplotlib/tests/test_subplots.py
+3-1Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,10 @@ def check_shared(axs, x_shared, y_shared):
1919
enumerate(zip("xy", [x_shared, y_shared]))):
2020
if i2 <= i1:
2121
continue
22+
share = getattr(ax1, "_shared_{}_axes".format(name))
23+
share = ax2 in share
2224
assert \
23-
(getattr(axs[0], "_shared_{}_axes".format(name)).joined(ax1, ax2)
25+
(share
2426
== shared[i1, i2]), \
2527
"axes %i and %i incorrectly %ssharing %s axis" % (
2628
i1, i2, "not " if shared[i1, i2] else "", name)

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.