Skip to content

Commit 1c55258

Browse files
committed
Split test, fix indentation
1 parent 68cc2f3 commit 1c55258

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

lib/matplotlib/axes/_base.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -990,7 +990,7 @@ def cla(self):
990990
x0, x1 = self._sharex.get_xlim()
991991
self.set_xlim(x0, x1, emit=False, auto=None)
992992
self.xaxis._scale = mscale.scale_factory(
993-
self._sharex.xaxis.get_scale(), self.xaxis)
993+
self._sharex.xaxis.get_scale(), self.xaxis)
994994
else:
995995
self.xaxis._set_scale('linear')
996996
try:
@@ -1004,7 +1004,7 @@ def cla(self):
10041004
y0, y1 = self._sharey.get_ylim()
10051005
self.set_ylim(y0, y1, emit=False, auto=None)
10061006
self.yaxis._scale = mscale.scale_factory(
1007-
self._sharey.yaxis.get_scale(), self.yaxis)
1007+
self._sharey.yaxis.get_scale(), self.yaxis)
10081008
else:
10091009
self.yaxis._set_scale('linear')
10101010
try:

lib/matplotlib/tests/test_axes.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4429,7 +4429,7 @@ def test_empty_shared_subplots():
44294429
assert y1 >= 6
44304430

44314431

4432-
def test_shared_with_aspect():
4432+
def test_shared_with_aspect_1():
44334433
# allow sharing one axis
44344434
for adjustable in ['box', 'datalim']:
44354435
fig, axes = plt.subplots(nrows=2, sharex=True)
@@ -4441,6 +4441,8 @@ def test_shared_with_aspect():
44414441
axes[0].set_aspect(2, adjustable=adjustable)
44424442
assert axes[1].get_aspect() == 'auto'
44434443

4444+
4445+
def test_shared_with_aspect_2():
44444446
# Share 2 axes only with 'box':
44454447
fig, axes = plt.subplots(nrows=2, sharex=True, sharey=True)
44464448
axes[0].set_aspect(2, share=True)
@@ -4450,6 +4452,8 @@ def test_shared_with_aspect():
44504452
assert axes[0].get_xlim() == axes[1].get_xlim()
44514453
assert axes[0].get_ylim() == axes[1].get_ylim()
44524454

4455+
4456+
def test_shared_with_aspect_3():
44534457
# Different aspect ratios:
44544458
for adjustable in ['box', 'datalim']:
44554459
fig, axes = plt.subplots(nrows=2, sharey=True)

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

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