@@ -554,7 +554,7 @@ def test_finder_hourly(self):
554
554
ser .plot (ax = ax )
555
555
xaxis = ax .get_xaxis ()
556
556
rs = xaxis .get_majorticklocs ()[0 ]
557
- if self .mpl_ge_2_1_0 :
557
+ if self .mpl_ge_2_0_1 :
558
558
xp = Period ('1999-01-01 00:00' , freq = 'H' ).ordinal
559
559
else :
560
560
xp = Period ('1998-12-31 22:00' , freq = 'H' ).ordinal
@@ -572,7 +572,8 @@ def test_gaps(self):
572
572
assert len (lines ) == 1
573
573
l = lines [0 ]
574
574
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
576
577
data = np .ma .MaskedArray (data , mask = isna (data ), fill_value = np .nan )
577
578
if not isinstance (data , np .ma .core .MaskedArray ):
578
579
print (matplotlib .__version__ , np .__version__ , type (data ))
@@ -591,7 +592,8 @@ def test_gaps(self):
591
592
assert len (lines ) == 1
592
593
l = lines [0 ]
593
594
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
595
597
data = np .ma .MaskedArray (data , mask = isna (data ), fill_value = np .nan )
596
598
if not isinstance (data , np .ma .core .MaskedArray ):
597
599
print (matplotlib .__version__ , np .__version__ , type (data ))
@@ -610,7 +612,8 @@ def test_gaps(self):
610
612
assert len (lines ) == 1
611
613
l = lines [0 ]
612
614
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
614
617
data = np .ma .MaskedArray (data , mask = isna (data ), fill_value = np .nan )
615
618
if not isinstance (data , np .ma .core .MaskedArray ):
616
619
print (matplotlib .__version__ , np .__version__ , type (data ))
@@ -634,7 +637,8 @@ def test_gap_upsample(self):
634
637
assert len (ax .right_ax .get_lines ()) == 1
635
638
l = lines [0 ]
636
639
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
638
642
data = np .ma .MaskedArray (data , mask = isna (data ), fill_value = np .nan )
639
643
640
644
if not isinstance (data , np .ma .core .MaskedArray ):
0 commit comments