|
13 | 13 | from pandas.compat import PY3, lmap, lrange, lzip, range, u, zip
|
14 | 14 | import pandas.util._test_decorators as td
|
15 | 15 |
|
| 16 | +from pandas.core.arrays import integer_array |
16 | 17 | from pandas.core.dtypes.api import is_list_like
|
17 | 18 |
|
18 | 19 | import pandas as pd
|
@@ -144,14 +145,24 @@ def test_plot(self):
|
144 | 145 | result = ax.axes
|
145 | 146 | assert result is axes[0]
|
146 | 147 |
|
147 |
| - @pytest.mark.parametrize("kwargs", [ |
148 |
| - dict(yticks=[1, 2, 3, 4]), |
149 |
| - dict(xticks=[4, 5, 3, 2]) |
150 |
| - ]) |
151 |
| - def test_integer_array_plot(self, kwargs): |
| 148 | + def test_integer_array_plot(self): |
152 | 149 | # GH 25587
|
153 |
| - s = Series([4, 5, 3, 2], dtype="UInt32") |
154 |
| - _check_plot_works(s.plot, **kwargs) |
| 150 | + arr = integer_array([1, 2, 3, 4], dtype="UInt32") |
| 151 | + |
| 152 | + s = Series(arr) |
| 153 | + _check_plot_works(s.plot.line) |
| 154 | + _check_plot_works(s.plot.bar) |
| 155 | + _check_plot_works(s.plot.hist) |
| 156 | + _check_plot_works(s.plot.pie) |
| 157 | + |
| 158 | + df = DataFrame({'x': arr, 'y': arr}) |
| 159 | + _check_plot_works(df.plot.line) |
| 160 | + _check_plot_works(df.plot.bar) |
| 161 | + _check_plot_works(df.plot.hist) |
| 162 | + _check_plot_works(df.plot.area) |
| 163 | + _check_plot_works(df.plot.pie, y='y') |
| 164 | + _check_plot_works(df.plot.scatter, x='x', y='y') |
| 165 | + _check_plot_works(df.plot.hexbin, x='x', y='y') |
155 | 166 |
|
156 | 167 | def test_mpl2_color_cycle_str(self):
|
157 | 168 | # GH 15516
|
|
0 commit comments