Changeset e4a703a in sasview
- Timestamp:
- Aug 30, 2011 7:15:37 PM (13 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:
- fe48fcc
- Parents:
- 5eede4e
- Location:
- sansguiframe/src/sans/guiframe/local_perspectives/plotting
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
sansguiframe/src/sans/guiframe/local_perspectives/plotting/Plotter1D.py
r5eede4e re4a703a 228 228 """ 229 229 if data.id in self.plots.keys(): 230 #replace except label 230 #Recover panel prop.s 231 xlo, xhi = self.subplot.get_xlim() 232 ylo, yhi = self.subplot.get_ylim() 231 233 old_data = self.plots[data.id] 232 234 data.label = old_data.label 233 235 data.custom_color = old_data.custom_color 236 # Replace data 234 237 self.graph.replace(data) 235 238 self.plots[data.id] = data 239 ## Set the view scale for all plots 240 self._onEVT_FUNC_PROPERTY() 241 # Recover the x,y limits 242 self.subplot.set_xlim((xlo, xhi)) 243 self.subplot.set_ylim((ylo, yhi)) 236 244 else: 237 245 self.plots[data.id] = data 238 246 self.graph.add(self.plots[data.id]) 239 240 ## Set the view scale for all plots241 self._onEVT_FUNC_PROPERTY()242 247 ## Set the view scale for all plots 248 self._onEVT_FUNC_PROPERTY() 249 250 243 251 def draw_plot(self): 244 252 """ -
sansguiframe/src/sans/guiframe/local_perspectives/plotting/Plotter2D.py
rfe857e2 re4a703a 166 166 :param event: data event 167 167 """ 168 xlo = None 169 xhi = None 170 ylo = None 171 yhi = None 168 172 ## Update self.data2d with the current plot 169 173 self.data2D = data 170 174 if data.id in self.plots.keys(): 171 175 #replace 176 xlo, xhi = self.subplot.get_xlim() 177 ylo, yhi = self.subplot.get_ylim() 172 178 self.graph.replace(data) 173 179 self.plots[data.id] = data … … 199 205 self.default_zmin_ctl = self.zmin_2D 200 206 self.default_zmax_ctl = self.zmax_2D 207 # Recover the x,y limits 208 if (xlo and xhi and ylo and yhi) != None: 209 if (xlo > data.xmin and xhi < data.xmax and\ 210 ylo > data.ymin and yhi < data.ymax): 211 self.subplot.set_xlim((xlo, xhi)) 212 self.subplot.set_ylim((ylo, yhi)) 201 213 202 214 def onContextMenu(self, event):
Note: See TracChangeset
for help on using the changeset viewer.