Skip to content

Commit d7fcb5e

Browse files
committed
test and example minor code changes.
1 parent a7d17f7 commit d7fcb5e

File tree

3 files changed

+14
-14
lines changed

3 files changed

+14
-14
lines changed

examples/ticks_and_spines/tick_label_right.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,11 @@
1414
import matplotlib.pyplot as plt
1515
import numpy as np
1616

17-
plt.rcParams['ytick.right'], plt.rcParams['ytick.labelright'] = True, True
18-
plt.rcParams['ytick.left'], plt.rcParams['ytick.labelleft'] = False, False
17+
plt.rcParams['ytick.right'] = plt.rcParams['ytick.labelright'] = True
18+
plt.rcParams['ytick.left'] = plt.rcParams['ytick.labelleft'] = False
1919

2020

21-
x = np.array([x for x in range(10)])
21+
x = np.array([x for x in np.range(10)])
2222

2323
_, ax = plt.subplots(2, 1, sharex=True, figsize=(6, 6))
2424

examples/ticks_and_spines/tick_xlabel_top.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@
1616
import numpy as np
1717

1818

19-
plt.rcParams['xtick.bottom'], plt.rcParams['xtick.labelbottom'] = False, False
20-
plt.rcParams['xtick.top'], plt.rcParams['xtick.labeltop'] = True, True
19+
plt.rcParams['xtick.bottom'] = plt.rcParams['xtick.labelbottom'] = False
20+
plt.rcParams['xtick.top'] = plt.rcParams['xtick.labeltop'] = True
2121

22-
x = np.array([x for x in range(10)])
22+
x = np.array([x for x in np.range(10)])
2323

2424
plt.plot(x)
2525
plt.title('xlabel top')

lib/matplotlib/tests/test_axes.py

+8-8
Original file line numberDiff line numberDiff line change
@@ -5232,10 +5232,10 @@ def test_axes_tick_params_ylabelside():
52325232
ax.tick_params(labelleft=False, labelright=True,
52335233
which='minor')
52345234
# expects left false, right true
5235-
assert(ax.yaxis.majorTicks[0].label1On is False)
5236-
assert(ax.yaxis.majorTicks[0].label2On is True)
5237-
assert(ax.yaxis.minorTicks[0].label1On is False)
5238-
assert(ax.yaxis.minorTicks[0].label2On is True)
5235+
assert ax.yaxis.majorTicks[0].label1On is False
5236+
assert ax.yaxis.majorTicks[0].label2On is True
5237+
assert ax.yaxis.minorTicks[0].label1On is False
5238+
assert ax.yaxis.minorTicks[0].label2On is True
52395239

52405240

52415241
def test_axes_tick_params_xlabelside():
@@ -5248,10 +5248,10 @@ def test_axes_tick_params_xlabelside():
52485248
# expects top True, bottom False
52495249
# label1On mapped to labelbottom
52505250
# label2On mapped to labeltop
5251-
assert(ax.xaxis.majorTicks[0].label1On is False)
5252-
assert(ax.xaxis.majorTicks[0].label2On is True)
5253-
assert(ax.xaxis.minorTicks[0].label1On is False)
5254-
assert(ax.xaxis.minorTicks[0].label2On is True)
5251+
assert ax.xaxis.majorTicks[0].label1On is False
5252+
assert ax.xaxis.majorTicks[0].label2On is True
5253+
assert ax.xaxis.minorTicks[0].label1On is False
5254+
assert ax.xaxis.minorTicks[0].label2On is True
52555255

52565256

52575257
def test_none_kwargs():

0 commit comments

Comments
 (0)