Changeset 31482fc in sasview
- Timestamp:
- Apr 20, 2009 9:50:58 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:
- bf5bfc0
- Parents:
- 6fb01b6
- Location:
- guiframe/local_perspectives/plotting
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
guiframe/local_perspectives/plotting/Plotter1D.py
r6063b16 r31482fc 12 12 import wx 13 13 import sys, os 14 import pylab, time 14 import pylab, time,numpy 15 15 16 16 import danse.common.plottools … … 60 60 ## flag to determine if the hide or show context menu item should 61 61 ## be displayed 62 self.errors_hide= 062 self.errors_hide=False 63 63 ## Unique ID (from gui_manager) 64 64 self.uid = None … … 125 125 if hasattr(event.plot, 'dx') and hasattr(self.plots[event.plot.name], 'dx'): 126 126 self.plots[event.plot.name].dx = event.plot.dx 127 127 128 128 #TODO: Should re-factor this 129 129 ## for all added plot the option to hide error show be displayed first 130 self.errors_hide = 0130 #self.errors_hide = 0 131 131 ## Set axis labels 132 132 self.graph.xaxis(event.plot._xaxis, event.plot._xunit) … … 137 137 self.graph.render(self) 138 138 self.subplot.figure.canvas.draw_idle() 139 140 139 if self.errors_hide: 140 self._on_remove_errors(evt=None) 141 else: 142 self._on_add_errors( evt=None) 143 return 144 141 145 def onLeftDown(self,event): 142 146 """ … … 209 213 self.action_ids[str(id)] = plot 210 214 wx.EVT_MENU(self, id, self._onSave) 211 #wx.EVT_MENU(self, id, self._onSaveXML) 212 215 213 216 id = wx.NewId() 214 217 slicerpop.Append(id, "Remove %s curve" % name) … … 221 224 if self.graph.selected_plottable in self.plots: 222 225 if self.plots[self.graph.selected_plottable].name in self.err_dy.iterkeys()\ 223 and self.errors_hide ==1:226 and self.errors_hide: 224 227 225 228 id = wx.NewId() … … 228 231 229 232 elif self.plots[self.graph.selected_plottable].__class__.__name__=="Data1D"\ 230 and self.errors_hide==0: 231 233 and not self.errors_hide: 232 234 id = wx.NewId() 233 235 slicerpop.Append(id, '&Hide Error bars') … … 274 276 dy=dy) 275 277 new_plot.interactive = True 276 self.errors_hide = 1278 self.errors_hide = True 277 279 new_plot.name = self.plots[self.graph.selected_plottable].name 278 280 if hasattr(self.plots[self.graph.selected_plottable], "group_id"): … … 317 319 if not self.graph.selected_plottable == None: 318 320 ##Reset the flag to display the hide option on the context menu 319 self.errors_hide = 0321 self.errors_hide = False 320 322 ## restore dy 321 323 length = len(self.plots[self.graph.selected_plottable].x) -
guiframe/local_perspectives/plotting/plotting.py
r7fff5cd r31482fc 114 114 # Check that the plot panel has no group ID 115 115 ## Use a panel with group_id ==None to plot 116 116 117 if panel.group_id==None: 117 118 is_available = True
Note: See TracChangeset
for help on using the changeset viewer.