Beispiel #1
0
 def test_curve_has_errors_returns_true_on_bin_plot_workspace_with_errors(self):
     ws = CreateWorkspace(DataX=[0, 1], DataY=[0, 1], DataE=[0.1, 0.1], NSpec=2,
                          OutputWorkspace='test_ws')
     fig = figure()
     ax = fig.add_subplot(111, projection='mantid')
     curve = ax.plot(ws, wkspIndex=0, axis=MantidAxType.BIN)[0]
     self.assertTrue(curve_has_errors(curve))
     ws.delete()
 def test_curve_has_errors_on_workspace_with_no_errors(self):
     try:
         ws = CreateWorkspace(DataX=[0], DataY=[0], NSpec=1,
                              OutputWorkspace='test_ws')
         fig = figure()
         ax = fig.add_subplot(111, projection='mantid')
         curve = ax.plot(ws, specNum=1)[0]
         self.assertFalse(curve_has_errors(curve))
     finally:
         ws.delete()