@@ -99,33 +99,12 @@ def test_nonnumeric_exclude(self):
99
99
with pytest .raises (TypeError , match = msg ):
100
100
df ["A" ].plot ()
101
101
102
- def test_tsplot_deprecated (self ):
103
- from pandas .tseries .plotting import tsplot
104
-
105
- _ , ax = self .plt .subplots ()
106
- ts = tm .makeTimeSeries ()
107
-
108
- with tm .assert_produces_warning (FutureWarning ):
109
- tsplot (ts , self .plt .Axes .plot , ax = ax )
110
-
111
102
@pytest .mark .slow
112
103
def test_tsplot (self ):
113
104
114
- from pandas .tseries .plotting import tsplot
115
-
116
105
_ , ax = self .plt .subplots ()
117
106
ts = tm .makeTimeSeries ()
118
107
119
- def f (* args , ** kwds ):
120
- with tm .assert_produces_warning (FutureWarning ):
121
- return tsplot (s , self .plt .Axes .plot , * args , ** kwds )
122
-
123
- for s in self .period_ser :
124
- _check_plot_works (f , s .index .freq , ax = ax , series = s )
125
-
126
- for s in self .datetime_ser :
127
- _check_plot_works (f , s .index .freq .rule_code , ax = ax , series = s )
128
-
129
108
for s in self .period_ser :
130
109
_check_plot_works (s .plot , ax = ax )
131
110
@@ -194,17 +173,6 @@ def check_format_of_first_point(ax, expected_string):
194
173
check_format_of_first_point (ax , "t = 2014-01-01 y = 1.000000" )
195
174
tm .close ()
196
175
197
- # tsplot
198
- from pandas .tseries .plotting import tsplot
199
-
200
- _ , ax = self .plt .subplots ()
201
- with tm .assert_produces_warning (FutureWarning ):
202
- tsplot (annual , self .plt .Axes .plot , ax = ax )
203
- check_format_of_first_point (ax , "t = 2014 y = 1.000000" )
204
- with tm .assert_produces_warning (FutureWarning ):
205
- tsplot (daily , self .plt .Axes .plot , ax = ax )
206
- check_format_of_first_point (ax , "t = 2014-01-01 y = 1.000000" )
207
-
208
176
@pytest .mark .slow
209
177
def test_line_plot_period_series (self ):
210
178
for s in self .period_ser :
@@ -892,16 +860,6 @@ def test_to_weekly_resampling(self):
892
860
for l in ax .get_lines ():
893
861
assert PeriodIndex (data = l .get_xdata ()).freq == idxh .freq
894
862
895
- _ , ax = self .plt .subplots ()
896
- from pandas .tseries .plotting import tsplot
897
-
898
- with tm .assert_produces_warning (FutureWarning ):
899
- tsplot (high , self .plt .Axes .plot , ax = ax )
900
- with tm .assert_produces_warning (FutureWarning ):
901
- lines = tsplot (low , self .plt .Axes .plot , ax = ax )
902
- for l in lines :
903
- assert PeriodIndex (data = l .get_xdata ()).freq == idxh .freq
904
-
905
863
@pytest .mark .slow
906
864
def test_from_weekly_resampling (self ):
907
865
idxh = date_range ("1/1/1999" , periods = 52 , freq = "W" )
@@ -926,21 +884,6 @@ def test_from_weekly_resampling(self):
926
884
tm .assert_numpy_array_equal (xdata , expected_h )
927
885
tm .close ()
928
886
929
- _ , ax = self .plt .subplots ()
930
- from pandas .tseries .plotting import tsplot
931
-
932
- with tm .assert_produces_warning (FutureWarning ):
933
- tsplot (low , self .plt .Axes .plot , ax = ax )
934
- with tm .assert_produces_warning (FutureWarning ):
935
- lines = tsplot (high , self .plt .Axes .plot , ax = ax )
936
- for l in lines :
937
- assert PeriodIndex (data = l .get_xdata ()).freq == idxh .freq
938
- xdata = l .get_xdata (orig = False )
939
- if len (xdata ) == 12 : # idxl lines
940
- tm .assert_numpy_array_equal (xdata , expected_l )
941
- else :
942
- tm .assert_numpy_array_equal (xdata , expected_h )
943
-
944
887
@pytest .mark .slow
945
888
def test_from_resampling_area_line_mixed (self ):
946
889
idxh = date_range ("1/1/1999" , periods = 52 , freq = "W" )
0 commit comments