Changeset ac8671e in sasview for guiframe/local_perspectives/plotting
- Timestamp:
- Apr 22, 2010 5:03:20 PM (15 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:
- 88ca6db
- Parents:
- 2d077a5b
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
guiframe/local_perspectives/plotting/Plotter2D.py
r20b6760 rac8671e 33 33 DEFAULT_BEAM = 0.005 34 34 BIN_WIDTH = 1.0 35 36 37 38 39 class ModelPanel2D( ModelPanel1D): 35 from danse.common.plottools.toolbar import NavigationToolBar 36 class NavigationToolBar2D(NavigationToolBar): 37 def __init__(self, canvas, parent=None): 38 NavigationToolBar.__init__(self, canvas=canvas, parent=parent) 39 40 def delete_option(self): 41 """ 42 remove default toolbar item 43 """ 44 #delete reset button 45 self.DeleteToolByPos(0) 46 #delete dragging 47 self.DeleteToolByPos(3) 48 #delete unwanted button that configures subplot parameters 49 self.DeleteToolByPos(4) 50 51 def add_option(self): 52 """ 53 add item to the toolbar 54 """ 55 #add print button 56 id_print = wx.NewId() 57 print_bmp = wx.ArtProvider.GetBitmap(wx.ART_PRINT, wx.ART_TOOLBAR) 58 self.AddSimpleTool(id_print, print_bmp, 59 'Print', 'Activate printing') 60 wx.EVT_TOOL(self, id_print, self.on_print) 61 62 63 64 class ModelPanel2D(ModelPanel1D): 40 65 """ 41 66 Plot panel for use with the GUI manager … … 93 118 self.default_zmin_ctl = self.zmin_2D 94 119 self.default_zmax_ctl = self.zmax_2D 95 120 121 def add_toolbar(self): 122 """ 123 add toolbar 124 """ 125 self.enable_toolbar = True 126 127 self.toolbar = NavigationToolBar2D(parent=self,canvas=self.canvas) 128 self.toolbar.Realize() 129 130 # On Windows platform, default window size is incorrect, so set 131 # toolbar width to figure width. 132 tw, th = self.toolbar.GetSizeTuple() 133 fw, fh = self.canvas.GetSizeTuple() 134 135 self.toolbar.SetSize(wx.Size(fw, th)) 136 self.sizer.Add(self.toolbar, 0, wx.LEFT | wx.EXPAND) 137 138 # update the axes menu on the toolbar 139 self.toolbar.update() 140 96 141 def _onEVT_1DREPLOT(self, event): 97 142 """
Note: See TracChangeset
for help on using the changeset viewer.