Changeset fa81e94 in sasview for src/sas/sasgui/plottools/plottables.py
- Timestamp:
- Nov 15, 2017 4:33:09 AM (7 years ago)
- Branches:
- ESS_GUI, ESS_GUI_Docs, ESS_GUI_batch_fitting, ESS_GUI_bumps_abstraction, ESS_GUI_iss1116, ESS_GUI_iss879, ESS_GUI_iss959, ESS_GUI_opencl, ESS_GUI_ordering, ESS_GUI_sync_sascalc
- Children:
- d4881f6a
- Parents:
- 7c487846
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/sasgui/plottools/plottables.py
- Property mode changed from 100644 to 100755
r2d9526d rfa81e94 242 242 selected_color = plottable.custom_color 243 243 selected_plottable = None 244 for p in self.plottables.keys():244 for p in list(self.plottables.keys()): 245 245 if plottable.id == p.id: 246 246 selected_plottable = p … … 389 389 390 390 """ 391 raise NotImplemented , "Not a valid transform"391 raise NotImplemented("Not a valid transform") 392 392 393 393 # Related issues … … 517 517 label_dict[collection[0]] = basename 518 518 else: 519 for i in xrange(len(collection)):519 for i in range(len(collection)): 520 520 label_dict[collection[i]] = "%s %d" % (basename, i) 521 521 return label_dict … … 689 689 msg = "Plottable.View: Given x and dx are not" 690 690 msg += " of the same length" 691 raise ValueError , msg691 raise ValueError(msg) 692 692 # Check length of y array 693 693 if not len(y) == len(x): 694 694 msg = "Plottable.View: Given y " 695 695 msg += "and x are not of the same length" 696 raise ValueError , msg696 raise ValueError(msg) 697 697 698 698 if dy is not None and not len(dy) == 0 and not len(y) == len(dy): 699 699 msg = "Plottable.View: Given y and dy are not of the same " 700 700 msg += "length: len(y)=%s, len(dy)=%s" % (len(y), len(dy)) 701 raise ValueError , msg701 raise ValueError(msg) 702 702 self.x = [] 703 703 self.y = [] … … 734 734 msg = "Plottable.View: transformed x " 735 735 msg += "and y are not of the same length" 736 raise ValueError , msg736 raise ValueError(msg) 737 737 if has_err_x and not (len(self.x) == len(self.dx)): 738 738 msg = "Plottable.View: transformed x and dx" 739 739 msg += " are not of the same length" 740 raise ValueError , msg740 raise ValueError(msg) 741 741 if has_err_y and not (len(self.y) == len(self.dy)): 742 742 msg = "Plottable.View: transformed y" 743 743 msg += " and dy are not of the same length" 744 raise ValueError , msg744 raise ValueError(msg) 745 745 # Check that negative values are not plot on x and y axis for 746 746 # log10 transformation … … 814 814 except: 815 815 logger.error("check_data_logX: skipping point x %g", self.x[i]) 816 logger.error(sys.exc_ value)816 logger.error(sys.exc_info()[1]) 817 817 self.x = tempx 818 818 self.y = tempy … … 844 844 except: 845 845 logger.error("check_data_logY: skipping point %g", self.y[i]) 846 logger.error(sys.exc_ value)846 logger.error(sys.exc_info()[1]) 847 847 848 848 self.x = tempx … … 1108 1108 Plottable.__init__(self) 1109 1109 msg = "Theory1D is no longer supported, please use Data1D and change symbol.\n" 1110 raise DeprecationWarning , msg1110 raise DeprecationWarning(msg) 1111 1111 1112 1112 class Fit1D(Plottable):
Note: See TracChangeset
for help on using the changeset viewer.