コード例 #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))