Changeset 4b91fd1 in sasview for guiframe/local_perspectives/plotting
- Timestamp:
- Jan 10, 2009 11:41:43 AM (16 years ago)
- Branches:
- master, 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, costrafo411, magnetic_scatt, release-4.1.1, release-4.1.2, release-4.2.2, release_4.0.1, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, ticket885, unittest-saveload
- Children:
- 24ea33c
- Parents:
- 9b05b2f
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
guiframe/local_perspectives/plotting/Plotter2D.py
rc73d871 r4b91fd1 101 101 """ 102 102 Data is ready to be displayed 103 104 #TODO: this name should be changed to something more appropriate 105 # Don't forget that changing this name will mean changing code 106 # in plotting.py 107 103 108 @param event: data event 104 109 """ … … 113 118 if hasattr(event, "reset"): 114 119 self._reset() 115 #print "model2 d event",event.plot.name, event.plot.id, event.plot.group_id116 #print "plottable list ",self.plots.keys()117 #print self.plots118 120 is_new = True 119 121 if event.plot.name in self.plots.keys(): … … 121 123 if not event.plot.__class__==self.plots[event.plot.name].__class__: 122 124 #overwrite a plottable using the same name 123 print "is deleting the new plottable"124 125 self.graph.delete(self.plots[event.plot.name]) 125 126 else: 126 127 # plottable is already draw on the panel 127 128 is_new = False 128 129 129 130 130 if is_new: 131 131 # a new plottable overwrites a plotted one using the same id 132 #print "went here",self.plots.itervalues()133 132 for plottable in self.plots.itervalues(): 134 133 if event.plot.id==plottable.id : … … 138 137 self.graph.add(self.plots[event.plot.name]) 139 138 else: 140 #replot the graph 141 self.plots[event.plot.name].x = event.plot.x 142 self.plots[event.plot.name].y = event.plot.y 143 self.plots[event.plot.name].dy = event.plot.dy 144 if hasattr(event.plot, 'dx') and hasattr(self.plots[event.plot.name], 'dx'): 145 self.plots[event.plot.name].dx = event.plot.dx 139 # Update the plottable with the new data 140 141 #TODO: we should have a method to do this, 142 # something along the lines of: 143 # plottable1.update_data_from_plottable(plottable2) 144 145 self.plots[event.plot.name].xmin = event.plot.xmin 146 self.plots[event.plot.name].xmax = event.plot.xmax 147 self.plots[event.plot.name].ymin = event.plot.ymin 148 self.plots[event.plot.name].ymax = event.plot.ymax 149 self.plots[event.plot.name].data = event.plot.data 150 self.plots[event.plot.name].err_data = event.plot.err_data 151 146 152 147 153
Note: See TracChangeset
for help on using the changeset viewer.