Changeset 16d7079 in sasview
- Timestamp:
- Jan 17, 2011 1:08:54 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:
- 1b02da1d
- Parents:
- 0d8642c9
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
guiframe/local_perspectives/plotting/profile_dialog.py
r02879ea r16d7079 1 2 3 1 """ 2 SLD Profile Dialog for multifunctional models 3 """ 4 4 import wx 5 5 import sys … … 10 10 import pylab 11 11 12 DEFAULT_CMAP = pylab.cm.jet12 DEFAULT_CMAP = None#pylab.cm.jet 13 13 _BOX_WIDTH = 76 14 14 _STATICBOX_WIDTH = 400 15 _SCALE = 1e-6 15 # X Y offset on plot 16 _X_OFF = 15 17 _Y_OFF = 0.5 16 18 17 19 #SLD panel size … … 63 65 data_plot = deepcopy(self.data) 64 66 data_plot.dy = self._set_dy_data() 67 # unit increase to M times for users 68 data_plot.y = self._set_y_data() 69 65 70 self.newplot = Theory1D(data_plot.x, data_plot.y, data_plot.dy) 66 71 self.newplot.name = 'SLD' 67 72 self.plotpanel.add_image(self.newplot) 68 self.Centre() 73 self.plotpanel.subplot.set_ylim(min(data_plot.y) - _Y_OFF , 74 max(data_plot.y) + _Y_OFF) 75 self.plotpanel.subplot.set_xlim(min(data_plot.x) - _X_OFF, 76 max(data_plot.x) + _X_OFF) 77 #self.Centre() 69 78 self.Layout() 70 79 … … 78 87 dy = [0 for y in self.data.y] 79 88 return dy 89 90 def _set_y_data(self): 91 """ 92 make y data unit Mega times 93 94 :return y_value: 95 """ 96 # changes the unit 97 y_value = [yvalue * 1e+006 for yvalue in self.data.y] 98 99 return y_value 80 100 81 101 def _setup_layout(self): … … 106 126 self.Close(True) 107 127 108 def _draw_model(self, event): 109 """ 110 on_close, update the model2d plot 111 """ 112 pass 113 114 def get_context_menu(self, graph=None): 115 """ 116 When the context menu of a plot is rendered, the 117 get_context_menu method will be called to give you a 118 chance to add a menu item to the context menu. 119 :param graph: the Graph object to which we attach the context menu 120 121 :return: a list of menu items with call-back function 122 """ 123 return [] 128 124 129 125 130 … … 152 157 self.plots[plot.name] = plot 153 158 #init graph 154 self.gaph = Graph()159 #self.gaph = Graph() 155 160 #add plot 156 161 self.graph.add(plot) … … 158 163 x1_label = self.axes_label[0] 159 164 self.graph.xaxis('\\rm{%s} '% x1_label, 'A') 160 self.graph.yaxis('\\rm{SLD} ', ' A^{-2}')165 self.graph.yaxis('\\rm{SLD} ', '10^{-6}A^{-2}') 161 166 #draw 162 167 self.graph.render(self) … … 165 170 # For latter scale changes 166 171 self.plots[plot.name].xaxis('\\rm{%s} '% x1_label, 'A') 167 self.plots[plot.name].yaxis('\\rm{SLD} ', ' A^{-2}')168 172 self.plots[plot.name].yaxis('\\rm{SLD} ', '10^{-6}A^{-2}') 173 169 174 def on_set_focus(self, event): 170 175 """
Note: See TracChangeset
for help on using the changeset viewer.