Changeset 886657f in sasview for sansguiframe/src/sans/guiframe


Ignore:
Timestamp:
Aug 24, 2011 6:03:54 PM (13 years ago)
Author:
Jae Cho <jhjcho@…>
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:
e095c3a9
Parents:
e1714a9
Message:

modified a little bit of Jessica's 'Add text' for plot

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sansguiframe/src/sans/guiframe/local_perspectives/plotting/Plotter1D.py

    re1714a9 r886657f  
    8686        self.graph.yaxis("\\rm{Intensity} ", "cm^{-1}") 
    8787        self.graph.render(self) 
    88          
     88        self.position = None 
    8989        # In resizing event 
    9090        self.resizing = False 
     
    257257        ax = event.inaxes 
    258258        if ax != None: 
    259             position = "x: %8.3g    y: %8.3g" % (event.xdata, event.ydata) 
     259            pos_x = "%8.3g"% event.xdata 
     260            pos_y = "%8.3g"% event.ydata 
     261            self.position = str(pos_x), str(pos_y) 
     262            position = "x: %s    y: %s" % (self.position) 
    260263            wx.PostEvent(self.parent, StatusEvent(status=position)) 
    261264        # unfocus all 
     
    418421        self._slicerpop.AppendSeparator() 
    419422         
     423        id = wx.NewId() 
     424        self._slicerpop.Append(id, '&Add text') 
     425        wx.EVT_MENU(self, id, self._on_addtext) 
     426        id = wx.NewId() 
     427        self._slicerpop.Append(id, '&Remove text') 
     428        wx.EVT_MENU(self, id, self._on_removetext) 
    420429        id = wx.NewId() 
    421430        self._slicerpop.Append(id, '&Change scale') 
     
    626635        self.toolbar.Realize() 
    627636        wx.EVT_TOOL(self, id_delete,  self._on_delete) 
    628          
     637        """ 
    629638        #New toolbar option - adding text to the plot 
    630639        self.toolbar.AddSeparator() 
     
    645654        self.toolbar.Realize() 
    646655        wx.EVT_TOOL(self, id_text,  self._on_removetext) 
    647  
     656        """ 
    648657    def _on_delete(self, event):  
    649658        """ 
Note: See TracChangeset for help on using the changeset viewer.