@@ -99,33 +99,12 @@ def test_nonnumeric_exclude(self):
9999 with pytest .raises (TypeError , match = msg ):
100100 df ["A" ].plot ()
101101
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-
111102 @pytest .mark .slow
112103 def test_tsplot (self ):
113104
114- from pandas .tseries .plotting import tsplot
115-
116105 _ , ax = self .plt .subplots ()
117106 ts = tm .makeTimeSeries ()
118107
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-
129108 for s in self .period_ser :
130109 _check_plot_works (s .plot , ax = ax )
131110
@@ -194,17 +173,6 @@ def check_format_of_first_point(ax, expected_string):
194173 check_format_of_first_point (ax , "t = 2014-01-01 y = 1.000000" )
195174 tm .close ()
196175
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-
208176 @pytest .mark .slow
209177 def test_line_plot_period_series (self ):
210178 for s in self .period_ser :
@@ -892,16 +860,6 @@ def test_to_weekly_resampling(self):
892860 for l in ax .get_lines ():
893861 assert PeriodIndex (data = l .get_xdata ()).freq == idxh .freq
894862
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-
905863 @pytest .mark .slow
906864 def test_from_weekly_resampling (self ):
907865 idxh = date_range ("1/1/1999" , periods = 52 , freq = "W" )
@@ -926,21 +884,6 @@ def test_from_weekly_resampling(self):
926884 tm .assert_numpy_array_equal (xdata , expected_h )
927885 tm .close ()
928886
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-
944887 @pytest .mark .slow
945888 def test_from_resampling_area_line_mixed (self ):
946889 idxh = date_range ("1/1/1999" , periods = 52 , freq = "W" )
0 commit comments