Changeset ddff053 in sasview for guitools/PlotPanel.py


Ignore:
Timestamp:
May 1, 2008 6:43:06 PM (16 years ago)
Author:
Gervaise Alina <gervyh@…>
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:
90640f2
Parents:
bbec827
Message:

making change on fitdialog ..still some bugs

File:
1 edited

Legend:

Unmodified
Added
Removed
  • guitools/PlotPanel.py

    rbbec827 rddff053  
    108108        #self.fit_result = Data1D(x=[], y=[],dx=None, dy=None) 
    109109        self.fit_result.name = "Fit" 
    110         self.fit_result.ID = "isFit" 
    111  
     110        self.xmin=0.0 
     111        self.xmax=0.0 
     112        self.xminView=0.0 
     113        self.xmaxView=0.0 
    112114    def onWheel(self, event): 
    113115        """ 
     
    115117        """ 
    116118        ax = event.inaxes 
    117          
    118119        step = event.step 
    119120 
     
    175176            first_item = list.keys()[0] 
    176177            dlg = LinearFit( None, first_item, self.onFitDisplay,self.returnTrans, -1, 'Fitting') 
     178            if (self.xmin !=0.0 )and ( self.xmax !=0.0)\ 
     179                and(self.xminView !=0.0 )and ( self.xmaxView !=0.0): 
     180                dlg.setFitRange(self.xminView,self.xmaxView,self.xmin,self.xmax) 
    177181            dlg.ShowModal()  
    178182 
     
    524528        self.subplot.figure.canvas.draw_idle() 
    525529         
    526     def onFitDisplay(self, tempx,tempy,xmin,xmax): 
     530    def onFitDisplay(self, tempx,tempy,xminView,xmaxView,xmin,xmax): 
    527531        """ 
    528532            Add a new plottable into the graph .In this case this plottable will be used  
     
    535539        list = self.graph.returnPlottable() 
    536540        for item in list: 
    537             item.onFitRange(xmin,xmax) 
     541            item.onFitRange(xminView,xmaxView) 
     542        self.xminView=xminView 
     543        self.xmaxView=xmaxView 
     544        self.xmin= xmin 
     545        self.xmax= xmax 
    538546        # Create new data plottable with result 
    539547        self.fit_result.x =[]  
Note: See TracChangeset for help on using the changeset viewer.