def test_multiple(self): """Test generation of plot with multiple records.""" for df in [self.bidf, self.tridf]: with self.subTest(df=df): out = densityplot(df) self.assertTrue(isinstance(out, matax.Axes)) plt.close('all')
def test_none(self): """Test generation of plot with no data.""" for df in [pd.DataFrame(columns=self.cols)]: with self.subTest(df=df): out = densityplot(df) self.assertTrue(isinstance(out, matax.Axes)) plt.close('all')
def test_one(self): """Test generation of plot with one record.""" for df in [self.bidf.head(1), self.tridf.head(1)]: with self.subTest(df=df): out = densityplot(self.bidf) self.assertTrue(isinstance(out, matax.Axes)) plt.close('all')
def test_modes(self): # """Tests different ploting modes.""" for df in [self.bidf, self.tridf]: with self.subTest(df=df): for mode in ['density', 'hist2d', 'hexbin']: with self.subTest(mode=mode): out = densityplot(df, mode=mode) self.assertTrue(isinstance(out, matax.Axes)) plt.close('all')
def test_bivariate_logscale(self): # """Tests logscale for different ploting modes using bivariate data.""" df = self.bidf for logspace in [True, False]: with self.subTest(logspace=logspace): for mode in ['density', 'hist2d', 'hexbin']: with self.subTest(mode=mode): out = densityplot(df, mode=mode) self.assertTrue(isinstance(out, matax.Axes)) plt.close('all')