コード例 #1
0
 def test_plot_box_data(self):
     """_plot_box_data() should return a dictionary for Line2D's."""
     fig, ax = plt.subplots()
     result = _plot_box_data(ax, [0, 0, 7, 8, -3, 44], 'blue', 0.33, 55,
                             1.5, 'stdv')
     self.assertEqual(result.__class__.__name__, "dict")
     self.assertEqual(len(result['boxes']), 1)
     self.assertEqual(len(result['medians']), 1)
     self.assertEqual(len(result['whiskers']), 2)
     self.assertEqual(len(result['fliers']), 2)
     self.assertEqual(len(result['caps']), 2)
コード例 #2
0
 def test_plot_box_data(self):
     """_plot_box_data() should return a dictionary for Line2D's."""
     fig, ax = plt.subplots()
     result = _plot_box_data(ax, [0, 0, 7, 8, -3, 44], 'blue', 0.33, 55,
                             1.5, 'stdv')
     self.assertEqual(result.__class__.__name__, "dict")
     self.assertEqual(len(result['boxes']), 1)
     self.assertEqual(len(result['medians']), 1)
     self.assertEqual(len(result['whiskers']), 2)
     self.assertEqual(len(result['fliers']), 2)
     self.assertEqual(len(result['caps']), 2)
コード例 #3
0
 def test_plot_box_data_empty(self):
     """Should ignore empty distribution."""
     fig, ax = plt.subplots()
     result = _plot_box_data(ax, [], 'blue', 0.33, 55, 1.5, 'stdv')
     self.assertTrue(result is None)
コード例 #4
0
 def test_plot_box_data_empty(self):
     """Should ignore empty distribution."""
     fig, ax = plt.subplots()
     result = _plot_box_data(ax, [], 'blue', 0.33, 55, 1.5, 'stdv')
     self.assertTrue(result is None)