예제 #1
0
 def test_ignore_zeros(self):
     self.data[:, 1] = 0
     self.data[:, 3] = np.nan
     self.figs.append(
         dcs.plot_bar_breakdown(self.time,
                                self.data,
                                label=self.label,
                                ignore_empties=True))
예제 #2
0
 def test_bad_legend(self):
     with self.assertRaises(AssertionError):
         dcs.plot_bar_breakdown(self.time,
                                self.data,
                                label=self.label,
                                legend=self.legend[:-1])
예제 #3
0
 def test_null_data(self):
     with dcs.capture_output() as out:
         dcs.plot_bar_breakdown(self.time, None, '')
     output = out.getvalue().strip()
     out.close()
     self.assertEqual(output, 'plot skipped due to missing data.')
예제 #4
0
 def test_legend(self):
     self.figs.append(
         dcs.plot_bar_breakdown(self.time,
                                self.data,
                                label=self.label,
                                legend=self.legend))
예제 #5
0
 def test_colormap(self):
     self.figs.append(
         dcs.plot_bar_breakdown(self.time,
                                self.data,
                                label=self.label,
                                colormap=self.colormap))
예제 #6
0
 def test_defaults(self):
     self.figs.append(
         dcs.plot_bar_breakdown(self.time, self.data, label=self.label))
예제 #7
0
 def test_opts(self):
     self.figs.append(
         dcs.plot_bar_breakdown(self.time,
                                self.data,
                                label=self.label,
                                opts=self.opts))
예제 #8
0
 def test_bad_legend(self):
     with self.assertRaises(AssertionError):
         dcs.plot_bar_breakdown(self.time, self.data, label=self.label, legend=self.legend[:-1])
예제 #9
0
 def test_nominal(self):
     self.figs.append(dcs.plot_bar_breakdown(self.time, self.data, label=self.label, opts=self.opts, \
         legend=self.legend, colormap=self.colormap))
예제 #10
0
 def test_ignore_zeros(self):
     self.data[:, 1] = 0
     self.data[:, 3] = np.nan
     self.figs.append(dcs.plot_bar_breakdown(self.time, self.data, label=self.label, ignore_empties=True))
예제 #11
0
 def test_null_data(self):
     with dcs.capture_output() as out:
         dcs.plot_bar_breakdown(self.time, None, '')
     output = out.getvalue().strip()
     out.close()
     self.assertEqual(output, 'plot skipped due to missing data.')
예제 #12
0
 def test_colormap(self):
     self.figs.append(dcs.plot_bar_breakdown(self.time, self.data, label=self.label, colormap=self.colormap))
예제 #13
0
 def test_legend(self):
     self.figs.append(dcs.plot_bar_breakdown(self.time, self.data, label=self.label, legend=self.legend))
예제 #14
0
 def test_opts(self):
     self.figs.append(dcs.plot_bar_breakdown(self.time, self.data, label=self.label, opts=self.opts))
예제 #15
0
 def test_defaults(self):
     self.figs.append(dcs.plot_bar_breakdown(self.time, self.data, label=self.label))
예제 #16
0
 def test_nominal(self):
     self.figs.append(dcs.plot_bar_breakdown(self.time, self.data, label=self.label, opts=self.opts, \
         legend=self.legend, colormap=self.colormap))