Changeset 6e48fd0 in sasview for calculatorview
- Timestamp:
- Aug 24, 2012 4:47:40 PM (12 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:
- b82e536
- Parents:
- 9bc37a8
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
calculatorview/src/sans/perspectives/calculator/data_operator.py
r7bfc888 r6e48fd0 639 639 self.is_number = is_number 640 640 self.content = content 641 self.point = None 641 642 self.position = (0.4, 0.5) 642 643 self.scale = 'linear' … … 673 674 self.plots = {} 674 675 self.clear() 676 self.point = plot 675 677 try: 676 678 self.figure.delaxes(self.figure.axes[0]) … … 804 806 id = wx.NewId() 805 807 slicerpop = wx.Menu() 806 slicerpop.Append(id, '&Change Scale') 807 wx.EVT_MENU(self, id, self._onProperties) 808 data = self.point 809 if issubclass(data.__class__, Data1D): 810 slicerpop.Append(id, '&Change Scale') 811 wx.EVT_MENU(self, id, self._onProperties) 812 else: 813 slicerpop.Append(id, '&Toggle Linear/Log Scale') 814 wx.EVT_MENU(self, id, self.ontogglescale) 808 815 try: 809 816 # mouse event … … 814 821 pos_x, pos_y = self.toolbar.GetPositionTuple() 815 822 pos = (pos_x, pos_y + 5) 816 817 823 self.PopupMenu(slicerpop, pos) 824 825 def ontogglescale(self, event): 826 """ 827 On toggle 2d scale 828 """ 829 self._onToggleScale(event) 830 try: 831 # mpl >= 1.1.0 832 self.figure.tight_layout() 833 except: 834 self.figure.subplots_adjust(left=0.1, bottom=0.1) 835 try: 836 self.figure.delaxes(self.figure.axes[1]) 837 except: 838 pass 818 839 819 840 def _onProperties(self, event):
Note: See TracChangeset
for help on using the changeset viewer.