Changeset aa1b747 in sasview for guiframe/local_perspectives
- Timestamp:
- Jan 14, 2009 5:23:45 PM (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:
- a19cd4d
- Parents:
- 212417e
- Location:
- guiframe/local_perspectives/plotting
- Files:
-
- 1 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
guiframe/local_perspectives/plotting/Plotter2D.py
r0f6d05f8 raa1b747 240 240 pos = self.ScreenToClient(pos) 241 241 self.PopupMenu(slicerpop, pos) 242 242 243 243 def _setSlicer(self, slicer): 244 244 # Clear current slicer … … 405 405 self.onClearSlicer(event) 406 406 wx.PostEvent(self.parent, InternalEvent(slicer= BoxInteractor)) 407 """ 408 self.onClearSlicer(event) 409 self.slicer=BoxInteractor 410 from SlicerParameters import SlicerParameterPanel 411 412 dialog = SlicerParameterPanel(self.parent, -1, "Slicer Parameters") 413 dialog.set_slicer(self.slicer.__name__, 414 self.slicer.get_params()) 415 if dialog.ShowModal() == wx.ID_OK: 416 dialog.Destroy() 417 wx.PostEvent(self.parent, InternalEvent(slicer= BoxInteractor)) 418 print "onboxavg",self.slicer 419 """ 407 408 from slicerpanel import SlicerPanel 409 new_panel = SlicerPanel(self.parent, -1, style=wx.RAISED_BORDER) 410 411 from sans.guicomm.events import SlicerParameterEvent 412 wx.PostEvent(self.parent, SlicerParameterEvent (panel= new_panel)) 413 420 414 421 415 def onClearSlicer(self, event): -
guiframe/local_perspectives/plotting/boxSlicer.py
r0f6d05f8 raa1b747 177 177 from DataLoader.manipulations import Boxavg 178 178 radius = math.sqrt(math.pow(self.qmax,2)+math.pow(self.qmax,2)) 179 x_min= self.left_line.x1 180 x_max= self.right_line.x1 181 y_min= self.bottom_line.y1 182 y_max= self.top_line.y1 183 box = Boxavg (x_min=x_min, x_max=x_max, y_min=y_min, y_max=y_max) 179 self.x= math.fabs(self.right_line.x1) 180 self.y= math.fabs(self.top_line.y1 ) 181 182 box = Boxavg (x_min=-self.x, x_max=self.x, y_min=-self.y, y_max=self.y) 184 183 185 184 self.count, self.error= box(self.base.data2D) … … 220 219 params = {} 221 220 params["x_max"]= math.fabs(self.right_line.x1) 222 params["y_max"]= math.fabs(self.top_line. x1)221 params["y_max"]= math.fabs(self.top_line.y1) 223 222 224 223 params["errors"] = self.error … … 227 226 228 227 def set_params(self, params): 228 229 229 self.x = float(math.fabs(params["x_max"])) 230 230 self.y = float(math.fabs(params["y_max"] )) … … 248 248 ymin= -1*self.y, 249 249 ymax= -1*self.y) 250 250 251 self._post_data() 251 252 def freeze_axes(self): -
guiframe/local_perspectives/plotting/plotting.py
rab8f936 raa1b747 17 17 from sans.guicomm.events import EVT_NEW_PLOT 18 18 from sans.guicomm.events import StatusEvent 19 from sans.guicomm.events import EVT_SLICER_PARS 19 20 20 21 class Plugin: … … 59 60 # Connect to plotting events 60 61 self.parent.Bind(EVT_NEW_PLOT, self._on_plot_event) 61 62 self.parent.Bind(EVT_SLICER_PARS, self._on_slicer_event) 62 63 # We have no initial panels for this plug-in 63 64 return [] … … 87 88 def _on_show_panel(self, event): 88 89 print "_on_show_panel" 89 90 def _on_slicer_event(self, event): 91 print "slicer event ", event.panel 92 new_panel = event.panel 93 # Set group ID if available 94 event_id = self.parent.popup_panel(new_panel) 95 self.menu.Append(event_id, new_panel.window_caption, 96 "Show %s plot panel" % new_panel.window_caption) 97 # Set UID to allow us to reference the panel later 98 new_panel.uid = event_id 99 100 self.plot_panels.append(new_panel) 101 return 90 102 def _on_plot_event(self, event): 91 103 """
Note: See TracChangeset
for help on using the changeset viewer.