Example #1
0
    def test_plot_kwarg(self):
        # Check with the matplotlib.pyplot module
        fig = plt.figure()
        fig.add_subplot(111)
        stats.boxcox_normplot(self.x, -20, 20, plot=plt)
        plt.close()

        # Check that a Matplotlib Axes object is accepted
        fig.add_subplot(111)
        ax = fig.add_subplot(111)
        stats.boxcox_normplot(self.x, -20, 20, plot=ax)
        plt.close()
    def test_plot_kwarg(self):
        # Check with the matplotlib.pyplot module
        fig = plt.figure()
        fig.add_subplot(111)
        stats.boxcox_normplot(self.x, -20, 20, plot=plt)
        plt.close()

        # Check that a Matplotlib Axes object is accepted
        fig.add_subplot(111)
        ax = fig.add_subplot(111)
        stats.boxcox_normplot(self.x, -20, 20, plot=ax)
        plt.close()
Example #3
0
 def test_basic(self):
     N = 5
     lmbdas, ppcc = stats.boxcox_normplot(self.x, -10, 10, N=N)
     ppcc_expected = [0.57783375, 0.83610988, 0.97524311, 0.99756057,
                      0.95843297]
     assert_allclose(lmbdas, np.linspace(-10, 10, num=N))
     assert_allclose(ppcc, ppcc_expected)
 def test_basic(self):
     N = 5
     lmbdas, ppcc = stats.boxcox_normplot(self.x, -10, 10, N=N)
     ppcc_expected = [
         0.57783375, 0.83610988, 0.97524311, 0.99756057, 0.95843297
     ]
     assert_allclose(lmbdas, np.linspace(-10, 10, num=N))
     assert_allclose(ppcc, ppcc_expected)
Example #5
0
 def test_empty(self):
     assert_(stats.boxcox_normplot([], 0, 1).size == 0)
 def test_empty(self):
     assert_(stats.boxcox_normplot([], 0, 1).size == 0)