def test_scatter_plot_legacy(self): tm._skip_if_no_scipy() df = DataFrame(randn(100, 2)) def scat(**kwds): return plotting.scatter_matrix(df, **kwds) with tm.assert_produces_warning(UserWarning): _check_plot_works(scat) with tm.assert_produces_warning(UserWarning): _check_plot_works(scat, marker='+') with tm.assert_produces_warning(UserWarning): _check_plot_works(scat, vmin=0) if _ok_for_gaussian_kde('kde'): with tm.assert_produces_warning(UserWarning): _check_plot_works(scat, diagonal='kde') if _ok_for_gaussian_kde('density'): with tm.assert_produces_warning(UserWarning): _check_plot_works(scat, diagonal='density') with tm.assert_produces_warning(UserWarning): _check_plot_works(scat, diagonal='hist') with tm.assert_produces_warning(UserWarning): _check_plot_works(scat, range_padding=.1) def scat2(x, y, by=None, ax=None, figsize=None): return plotting.scatter_plot(df, x, y, by, ax, figsize=None) _check_plot_works(scat2, x=0, y=1) grouper = Series(np.repeat([1, 2, 3, 4, 5], 20), df.index) with tm.assert_produces_warning(UserWarning): _check_plot_works(scat2, x=0, y=1, by=grouper)
def test_scatter_plot_legacy(self): tm._skip_if_no_scipy() df = DataFrame(randn(100, 2)) def scat(**kwds): return plotting.scatter_matrix(df, **kwds) with tm.assert_produces_warning(UserWarning): _check_plot_works(scat) with tm.assert_produces_warning(UserWarning): _check_plot_works(scat, marker='+') with tm.assert_produces_warning(UserWarning): _check_plot_works(scat, vmin=0) if _ok_for_gaussian_kde('kde'): with tm.assert_produces_warning(UserWarning): _check_plot_works(scat, diagonal='kde') if _ok_for_gaussian_kde('density'): with tm.assert_produces_warning(UserWarning): _check_plot_works(scat, diagonal='density') with tm.assert_produces_warning(UserWarning): _check_plot_works(scat, diagonal='hist') with tm.assert_produces_warning(UserWarning): _check_plot_works(scat, range_padding=.1) def scat2(x, y, by=None, ax=None, figsize=None): return plotting.scatter_plot(df, x, y, by, ax, figsize=None) _check_plot_works(scat2, x=0, y=1) grouper = Series(np.repeat([1, 2, 3, 4, 5], 20), df.index) with tm.assert_produces_warning(UserWarning): _check_plot_works(scat2, x=0, y=1, by=grouper)