Skip to content

Commit d6bfe40

Browse files
committed
moar
1 parent 0e88df6 commit d6bfe40

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

pandas/tests/plotting/common.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,8 @@ def _ok_for_gaussian_kde(kind):
3939
from scipy.stats import gaussian_kde # noqa
4040
except ImportError:
4141
return False
42-
return True
42+
43+
return plotting._compat._mpl_ge_1_5_0()
4344

4445

4546
class TestPlotBase(object):

pandas/tests/plotting/test_frame.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1289,6 +1289,9 @@ def test_boxplot_subplots_return_type(self):
12891289
def test_kde_df(self):
12901290
tm._skip_if_no_scipy()
12911291
_skip_if_no_scipy_gaussian_kde()
1292+
if not self.mpl_ge_1_5_0:
1293+
pytest.skip("mpl is not supported")
1294+
12921295
df = DataFrame(randn(100, 4))
12931296
ax = _check_plot_works(df.plot, kind='kde')
12941297
expected = [pprint_thing(c) for c in df.columns]
@@ -1310,6 +1313,9 @@ def test_kde_df(self):
13101313
def test_kde_missing_vals(self):
13111314
tm._skip_if_no_scipy()
13121315
_skip_if_no_scipy_gaussian_kde()
1316+
if not self.mpl_ge_1_5_0:
1317+
pytest.skip("mpl is not supported")
1318+
13131319
df = DataFrame(np.random.uniform(size=(100, 4)))
13141320
df.loc[0, 0] = np.nan
13151321
_check_plot_works(df.plot, kind='kde')
@@ -1834,6 +1840,8 @@ def test_hist_colors(self):
18341840
def test_kde_colors(self):
18351841
tm._skip_if_no_scipy()
18361842
_skip_if_no_scipy_gaussian_kde()
1843+
if not self.mpl_ge_1_5_0:
1844+
pytest.skip("mpl is not supported")
18371845

18381846
from matplotlib import cm
18391847

@@ -1857,6 +1865,8 @@ def test_kde_colors(self):
18571865
def test_kde_colors_and_styles_subplots(self):
18581866
tm._skip_if_no_scipy()
18591867
_skip_if_no_scipy_gaussian_kde()
1868+
if not self.mpl_ge_1_5_0:
1869+
pytest.skip("mpl is not supported")
18601870

18611871
from matplotlib import cm
18621872
default_colors = self._maybe_unpack_cycler(self.plt.rcParams)

0 commit comments

Comments
 (0)