Skip to content

Commit b971bfb

Browse files
committed
Last round of mpl debugging
1 parent 925b555 commit b971bfb

File tree

3 files changed

+9
-7
lines changed

3 files changed

+9
-7
lines changed

pandas/plotting/_compat.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ def inner():
1919

2020

2121
_mpl_ge_2_0_1 = _mpl_version('2.0.1', operator.ge)
22-
_mpl_ge_2_1_0 = _mpl_version('2.1.0', operator.ge)
2322
_mpl_ge_2_2_0 = _mpl_version('2.2.0', operator.ge)
2423
_mpl_ge_2_2_2 = _mpl_version('2.2.2', operator.ge)
2524
_mpl_ge_3_0_0 = _mpl_version('3.0.0', operator.ge)

pandas/tests/plotting/common.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,6 @@ def setup_method(self, method):
5151
mpl.rcdefaults()
5252

5353
self.mpl_ge_2_0_1 = plotting._compat._mpl_ge_2_0_1()
54-
self.mpl_ge_2_1_0 = plotting._compat._mpl_ge_2_1_0()
5554
self.mpl_ge_2_2_0 = plotting._compat._mpl_ge_2_2_0()
5655
self.mpl_ge_2_2_2 = plotting._compat._mpl_ge_2_2_2()
5756
self.mpl_ge_3_0_0 = plotting._compat._mpl_ge_3_0_0()

pandas/tests/plotting/test_datetimelike.py

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -554,7 +554,7 @@ def test_finder_hourly(self):
554554
ser.plot(ax=ax)
555555
xaxis = ax.get_xaxis()
556556
rs = xaxis.get_majorticklocs()[0]
557-
if self.mpl_ge_2_1_0:
557+
if self.mpl_ge_2_0_1:
558558
xp = Period('1999-01-01 00:00', freq='H').ordinal
559559
else:
560560
xp = Period('1998-12-31 22:00', freq='H').ordinal
@@ -572,7 +572,8 @@ def test_gaps(self):
572572
assert len(lines) == 1
573573
l = lines[0]
574574
data = l.get_xydata()
575-
if self.mpl_ge_3_0_0:
575+
if self.mpl_ge_3_0_0 or not self.mpl_ge_2_0_1:
576+
# 2.0.0 or >= 3.0.0
576577
data = np.ma.MaskedArray(data, mask=isna(data), fill_value=np.nan)
577578
if not isinstance(data, np.ma.core.MaskedArray):
578579
print(matplotlib.__version__, np.__version__, type(data))
@@ -591,7 +592,8 @@ def test_gaps(self):
591592
assert len(lines) == 1
592593
l = lines[0]
593594
data = l.get_xydata()
594-
if self.mpl_ge_3_0_0:
595+
if self.mpl_ge_3_0_0 or not self.mpl_ge_2_0_1:
596+
# 2.0.0 or >= 3.0.0
595597
data = np.ma.MaskedArray(data, mask=isna(data), fill_value=np.nan)
596598
if not isinstance(data, np.ma.core.MaskedArray):
597599
print(matplotlib.__version__, np.__version__, type(data))
@@ -610,7 +612,8 @@ def test_gaps(self):
610612
assert len(lines) == 1
611613
l = lines[0]
612614
data = l.get_xydata()
613-
if self.mpl_ge_3_0_0:
615+
if self.mpl_ge_3_0_0 or not self.mpl_ge_2_0_1:
616+
# 2.0.0 or >= 3.0.0
614617
data = np.ma.MaskedArray(data, mask=isna(data), fill_value=np.nan)
615618
if not isinstance(data, np.ma.core.MaskedArray):
616619
print(matplotlib.__version__, np.__version__, type(data))
@@ -634,7 +637,8 @@ def test_gap_upsample(self):
634637
assert len(ax.right_ax.get_lines()) == 1
635638
l = lines[0]
636639
data = l.get_xydata()
637-
if self.mpl_ge_3_0_0:
640+
if self.mpl_ge_3_0_0 or not self.mpl_ge_2_0_1:
641+
# 2.0.0 or >= 3.0.0
638642
data = np.ma.MaskedArray(data, mask=isna(data), fill_value=np.nan)
639643

640644
if not isinstance(data, np.ma.core.MaskedArray):

0 commit comments

Comments
 (0)