Changeset 570a58f9 in sasview for src/sas/qtgui/PlotterBase.py


Ignore:
Timestamp:
Jan 6, 2017 3:40:05 AM (7 years ago)
Author:
Piotr Rozyczko <rozyczko@…>
Branches:
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
Children:
fed94a2
Parents:
aadf0af1
git-author:
Piotr Rozyczko <rozyczko@…> (01/06/17 03:31:10)
git-committer:
Piotr Rozyczko <rozyczko@…> (01/06/17 03:40:05)
Message:

Linear fits for 1D charts

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/sas/qtgui/PlotterBase.py

    raadf0af1 r570a58f9  
    5858 
    5959        # Mouse click related 
     60        self._scale_xlo = None 
     61        self._scale_xhi = None 
     62        self._scale_ylo = None 
     63        self._scale_yhi = None 
    6064        self.x_click = None 
    6165        self.y_click = None 
     
    7074        # Pre-define the Scale properties dialog 
    7175        self.properties = ScaleProperties(self, 
    72                                           init_scale_x=self.x_label, 
    73                                           init_scale_y=self.y_label) 
     76                                init_scale_x=self.x_label, 
     77                                init_scale_y=self.y_label) 
    7478 
    7579        # default color map 
     
    460464        # Notify the listeners about a new graph title 
    461465        self.manager.communicator.activeGraphName.emit((current_title, title)) 
     466 
     467    def offset_graph(self): 
     468        """ 
     469        Zoom and offset the graph to the last known settings 
     470        """ 
     471        for ax in self.axes: 
     472            if self._scale_xhi is not None and self._scale_xlo is not None: 
     473                ax.set_xlim(self._scale_xlo, self._scale_xhi) 
     474            if self._scale_yhi is not None and self._scale_ylo is not None: 
     475                ax.set_ylim(self._scale_ylo, self._scale_yhi) 
Note: See TracChangeset for help on using the changeset viewer.