Changeset b5181f6 in sasview
- Timestamp:
- Jan 21, 2011 12:59:55 PM (14 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:
- 75a7ece
- Parents:
- f53444be
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
theoryview/perspectives/theory/profile_dialog.py
rf53444be rb5181f6 39 39 ## Flag to tell the AUI manager to put this panel in the center pane 40 40 CENTER_PANE = True 41 def __init__(self, parent=None,base=None,data =None,axes =['Radius'], id = -1, *args, **kwds): 41 def __init__(self, parent=None, base=None ,data=None, 42 axes =['Radius'], id = -1, *args, **kwds): 42 43 kwds["style"] = wx.DEFAULT_DIALOG_STYLE 43 kwds["size"] = wx.Size(_STATICBOX_WIDTH *1.5,PANEL_SIZE)44 wx.Dialog.__init__(self, parent, id =id, *args, **kwds)45 if data != None:46 44 kwds["size"] = wx.Size(_STATICBOX_WIDTH * 1.5,PANEL_SIZE) 45 wx.Dialog.__init__(self, parent, id=id, *args, **kwds) 46 47 if data is not None: 47 48 #Font size 48 kwds = []49 kwds = [] 49 50 self.SetWindowVariant(variant=FONT_VARIANT) 50 51 51 self.SetTitle("Scattering Length Density Profile") 52 52 self.parent = base 53 53 self.data = data 54 54 self.str = self.data.__str__() 55 56 55 ## when 2 data have the same id override the 1 st plotted 57 56 self.name = self.data.name 58 59 57 # Panel for plot 60 self.plotpanel = SLDplotpanel(self, axes, -1, style=wx.TRANSPARENT_WINDOW) 58 self.plotpanel = SLDplotpanel(self, axes, -1, 59 style=wx.TRANSPARENT_WINDOW) 61 60 self.cmap = DEFAULT_CMAP 62 61 ## Create Artist and bind it 63 62 self.subplot = self.plotpanel.subplot 64 65 63 self._setup_layout() 66 64 data_plot = deepcopy(self.data) … … 68 66 self.newplot.name = 'SLD' 69 67 self.plotpanel.add_image(self.newplot) 70 71 68 self.Centre() 72 69 self.Layout() 73 70 74 75 71 def _setup_layout(self): 76 72 """ … … 80 76 sizer = wx.GridBagSizer(14,14) 81 77 82 sizer.Add(self.plotpanel,(0, 0), (13, 13), wx.EXPAND | wx.LEFT| wx.RIGHT, 1) 78 sizer.Add(self.plotpanel,(0, 0), (13, 13), 79 wx.EXPAND|wx.LEFT| wx.RIGHT, 1) 83 80 84 81 #-----Button------------1 … … 86 83 button_reset = wx.Button(self, id, "Close") 87 84 button_reset.SetToolTipString("Close...") 88 button_reset.Bind(wx.EVT_BUTTON, self._close, id = button_reset.GetId()) 89 sizer.Add(button_reset, (13, 12), flag=wx.RIGHT | wx.BOTTOM, border=15) 90 85 button_reset.Bind(wx.EVT_BUTTON, self._close, 86 id=button_reset.GetId()) 87 sizer.Add(button_reset, (13, 12), 88 flag=wx.RIGHT|wx.BOTTOM, border=15) 91 89 sizer.AddGrowableCol(2) 92 90 sizer.AddGrowableRow(3) … … 114 112 Panel 115 113 """ 116 def __init__(self, parent,axes=[], id = -1, color = None, dpi = None, **kwargs): 114 def __init__(self, parent, axes=[], id=-1, color=None, 115 dpi=None, **kwargs): 117 116 """ 118 117 """ 119 PlotPanel.__init__(self, parent, id=id, color=color, dpi=dpi, **kwargs) 118 PlotPanel.__init__(self, parent, id=id, 119 color=color, dpi=dpi, **kwargs) 120 120 # Keep track of the parent Frame 121 121 self.parent = parent … … 139 139 #add axes 140 140 x1_label = self.axes_label[0] 141 self.graph.xaxis('\\rm{%s} ' % x1_label, '\\AA')141 self.graph.xaxis('\\rm{%s} ' % x1_label, '\\AA') 142 142 self.graph.yaxis('\\rm{SLD} ', '\\AA^{-2}') 143 144 145 143 #draw 146 144 self.graph.render(self) … … 181 179 """ 182 180 # Initialize the Frame object 183 wx.Frame.__init__(self, parent, id, title, wx.DefaultPosition, wx.Size(950,850))184 181 wx.Frame.__init__(self, parent, id, title, wx.DefaultPosition, 182 wx.Size(950, 850)) 185 183 # Panel for 1D plot 186 184 self.plotpanel = SLDplotpanel(self, -1, style=wx.RAISED_BORDER)
Note: See TracChangeset
for help on using the changeset viewer.