Changeset 857d00f in sasview
- Timestamp:
- Aug 31, 2011 10:39:09 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:
- 7022fdc
- Parents:
- 9680906d
- Location:
- sansguiframe/src/sans/guiframe/local_perspectives/plotting
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
sansguiframe/src/sans/guiframe/local_perspectives/plotting/Plotter1D.py
rc17760d r857d00f 430 430 self._slicerpop.AppendSeparator() 431 431 432 id = wx.NewId() 433 self._slicerpop.Append(id, '&Modify Y Axis Label') 434 wx.EVT_MENU(self, id, self._on_yaxis_label) 435 id = wx.NewId() 436 self._slicerpop.Append(id, '&Modify X Axis Label') 437 wx.EVT_MENU(self, id, self._on_xaxis_label) 438 self._slicerpop.AppendSeparator() 439 432 440 if self.position != None: 433 441 id = wx.NewId() … … 437 445 self._slicerpop.Append(id, '&Remove Text') 438 446 wx.EVT_MENU(self, id, self._on_removetext) 447 self._slicerpop.AppendSeparator() 439 448 id = wx.NewId() 440 449 self._slicerpop.Append(id, '&Change Scale') 441 450 wx.EVT_MENU(self, id, self._onProperties) 451 self._slicerpop.AppendSeparator() 442 452 id = wx.NewId() 443 453 self._slicerpop.Append(id, '&Reset Graph') -
sansguiframe/src/sans/guiframe/local_perspectives/plotting/Plotter2D.py
rc17760d r857d00f 176 176 yhi = None 177 177 ## Update self.data2d with the current plot 178 178 self.data2D = data 179 179 if data.id in self.plots.keys(): 180 180 #replace … … 201 201 data._xunit = 'pixel' 202 202 data._yunit = 'pixel' 203 204 # graph properties 203 205 self.graph.xaxis(data._xaxis, data._xunit) 204 206 self.graph.yaxis(data._yaxis, data._yunit) 207 205 208 data.label = self.title_label 206 209 … … 211 214 self.graph.title(data.label) 212 215 self.graph.render(self) 216 # Set the axis labels on subplot 217 self._set_axis_labels() 213 218 self.draw_plot() 214 215 219 else: 216 220 self.graph.render(self) … … 221 225 self.subplot.figure.canvas.draw_idle() 222 226 223 self.data2D = data227 224 228 ## store default value of zmin and zmax 225 229 self.default_zmin_ctl = self.zmin_2D … … 233 237 else: 234 238 self.toolbar.update() 235 239 def _set_axis_labels(self): 240 """ 241 Set axis labels 242 """ 243 data = self.data2D 244 # control axis labels from the panel itself 245 yname, yunits = data.get_yaxis() 246 if self.yaxis_label != None: 247 yname = self.yaxis_label 248 yunits = self.yaxis_unit 249 else: 250 self.yaxis_label = yname 251 self.yaxis_unit = yunits 252 xname, xunits = data.get_xaxis() 253 if self.xaxis_label != None: 254 xname = self.xaxis_label 255 xunits = self.xaxis_unit 256 else: 257 self.xaxis_label = xname 258 self.xaxis_unit = xunits 259 self.xaxis(xname, xunits, self.xaxis_font, self.xaxis_color) 260 self.yaxis(yname, yunits, self.yaxis_font, self.yaxis_color) 261 236 262 def onContextMenu(self, event): 237 263 """ … … 327 353 328 354 id = wx.NewId() 355 slicerpop.Append(id, '&Modify Y Axis Label') 356 wx.EVT_MENU(self, id, self._on_yaxis_label) 357 id = wx.NewId() 358 slicerpop.Append(id, '&Modify X Axis Label') 359 wx.EVT_MENU(self, id, self._on_xaxis_label) 360 slicerpop.AppendSeparator() 361 362 id = wx.NewId() 329 363 slicerpop.Append(id, '&2D Color Map') 330 364 wx.EVT_MENU(self, id, self._onEditDetector) 365 slicerpop.AppendSeparator() 366 331 367 id = wx.NewId() 332 368 slicerpop.Append(id, '&Toggle Linear/Log Scale')
Note: See TracChangeset
for help on using the changeset viewer.