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

Skip to content

Commit 77c90fa

Browse files
committed
remove usage of deprecated *lim kwargs from set_*lim
1 parent ff67864 commit 77c90fa

4 files changed

Lines changed: 7 additions & 7 deletions

File tree

examples/scales/log_demo.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
ax4.set(title='Errorbars go negative')
4141
ax4.errorbar(x, y, xerr=0.1 * x, yerr=5.0 + 0.75 * y)
4242
# ylim must be set after errorbar to allow errorbar to autoscale limits
43-
ax4.set_ylim(ymin=0.1)
43+
ax4.set_ylim(bottom=0.1)
4444

4545
fig.tight_layout()
4646
plt.show()

lib/matplotlib/axes/_axes.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7307,8 +7307,8 @@ def spy(self, Z, precision=0, marker=None, markersize=None,
73077307
marker=marker, markersize=markersize, **kwargs)
73087308
self.add_line(marks)
73097309
nr, nc = Z.shape
7310-
self.set_xlim(xmin=-0.5, xmax=nc - 0.5)
7311-
self.set_ylim(ymin=nr - 0.5, ymax=-0.5)
7310+
self.set_xlim(-0.5, nc - 0.5)
7311+
self.set_ylim(nr - 0.5, -0.5)
73127312
self.set_aspect(aspect)
73137313
ret = marks
73147314
self.title.set_y(1.05)

lib/matplotlib/tests/test_axes.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1577,7 +1577,7 @@ def test_hist_step_filled():
15771577
for kg, _type, ax in zip(kwargs, types, axes):
15781578
ax.hist(x, n_bins, histtype=_type, stacked=True, **kg)
15791579
ax.set_title('%s/%s' % (kg, _type))
1580-
ax.set_ylim(ymin=-50)
1580+
ax.set_ylim(bottom=-50)
15811581

15821582
patches = axes[0].patches
15831583
assert all(p.get_facecolor() == p.get_edgecolor() for p in patches)

lib/matplotlib/tests/test_simplification.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ def test_overflow():
3333

3434
fig, ax = plt.subplots()
3535
ax.plot(x, y)
36-
ax.set_xlim(xmin=2, xmax=6)
36+
ax.set_xlim(2, 6)
3737

3838

3939
@image_comparison(baseline_images=['clipping_diamond'], remove_text=True)
@@ -43,8 +43,8 @@ def test_diamond():
4343

4444
fig, ax = plt.subplots()
4545
ax.plot(x, y)
46-
ax.set_xlim(xmin=-0.6, xmax=0.6)
47-
ax.set_ylim(ymin=-0.6, ymax=0.6)
46+
ax.set_xlim(-0.6, 0.6)
47+
ax.set_ylim(-0.6, 0.6)
4848

4949

5050
def test_noise():

0 commit comments

Comments
 (0)