Ejemplo n.º 1
0
 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')
Ejemplo n.º 2
0
 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')
Ejemplo n.º 3
0
    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')
Ejemplo n.º 4
0
 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')
Ejemplo n.º 5
0
 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')