Changeset b3e8629 in sasview for src/sas/qtgui/Plotting/Plottables.py
- Timestamp:
- Nov 9, 2017 8:41:54 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:
- cee5c78
- Parents:
- 749b715
- git-author:
- Piotr Rozyczko <rozyczko@…> (10/26/17 03:13:05)
- git-committer:
- Piotr Rozyczko <rozyczko@…> (11/09/17 08:41:54)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/qtgui/Plotting/Plottables.py
rdc5ef15 rb3e8629 239 239 selected_color = None 240 240 selected_plottable = None 241 for p in self.plottables.keys():241 for p in list(self.plottables.keys()): 242 242 if plottable.id == p.id: 243 243 selected_plottable = p … … 384 384 385 385 """ 386 raise NotImplemented , "Not a valid transform"386 raise NotImplemented("Not a valid transform") 387 387 388 388 # Related issues … … 512 512 label_dict[collection[0]] = basename 513 513 else: 514 for i in xrange(len(collection)):514 for i in range(len(collection)): 515 515 label_dict[collection[i]] = "%s %d" % (basename, i) 516 516 return label_dict … … 684 684 msg = "Plottable.View: Given x and dx are not" 685 685 msg += " of the same length" 686 raise ValueError , msg686 raise ValueError(msg) 687 687 # Check length of y array 688 688 if not len(y) == len(x): 689 689 msg = "Plottable.View: Given y " 690 690 msg += "and x are not of the same length" 691 raise ValueError , msg691 raise ValueError(msg) 692 692 693 693 if not dy is None and not len(dy) == 0 and not len(y) == len(dy): 694 694 msg = "Plottable.View: Given y and dy are not of the same " 695 695 msg += "length: len(y)=%s, len(dy)=%s" % (len(y), len(dy)) 696 raise ValueError , msg696 raise ValueError(msg) 697 697 self.x = [] 698 698 self.y = [] … … 729 729 msg = "Plottable.View: transformed x " 730 730 msg += "and y are not of the same length" 731 raise ValueError , msg731 raise ValueError(msg) 732 732 if has_err_x and not (len(self.x) == len(self.dx)): 733 733 msg = "Plottable.View: transformed x and dx" 734 734 msg += " are not of the same length" 735 raise ValueError , msg735 raise ValueError(msg) 736 736 if has_err_y and not (len(self.y) == len(self.dy)): 737 737 msg = "Plottable.View: transformed y" 738 738 msg += " and dy are not of the same length" 739 raise ValueError , msg739 raise ValueError(msg) 740 740 # Check that negative values are not plot on x and y axis for 741 741 # log10 transformation … … 809 809 except: 810 810 logging.error("check_data_logX: skipping point x %g", self.x[i]) 811 logging.error(sys.exc_ value)811 logging.error(sys.exc_info()[1]) 812 812 self.x = tempx 813 813 self.y = tempy … … 839 839 except: 840 840 logging.error("check_data_logY: skipping point %g", self.y[i]) 841 logging.error(sys.exc_ value)841 logging.error(sys.exc_info()[1]) 842 842 843 843 self.x = tempx … … 1101 1101 Plottable.__init__(self) 1102 1102 msg = "Theory1D is no longer supported, please use Data1D and change symbol.\n" 1103 raise DeprecationWarning , msg1103 raise DeprecationWarning(msg) 1104 1104 1105 1105 class PlottableFit1D(Plottable):
Note: See TracChangeset
for help on using the changeset viewer.