- Timestamp:
- May 5, 2008 3:09:05 PM (17 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:
- 71c64d6
- Parents:
- b43a009
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
guitools/PlotPanel.py
rb43a009 redce46e 139 139 self.Chivalue=None 140 140 def resetFitView(self): 141 # For fit Dialog initial display 141 """ 142 For fit Dialog initial display 143 """ 142 144 self.xmin=0.0 143 145 self.xmax=0.0 … … 192 194 193 195 def returnTrans(self): 196 """ 197 Return values and labels used by Fit Dialog 198 """ 194 199 return self.xLabel,self.yLabel, self.Avalue, self.Bvalue,\ 195 self.ErrAvalue,self.ErrBvalue,self.Chivalue200 self.ErrAvalue,self.ErrBvalue,self.Chivalue 196 201 197 202 def setTrans(self,xtrans,ytrans): … … 579 584 Add a new plottable into the graph .In this case this plottable will be used 580 585 to fit some data 581 @param plottable: the plottable to plot 582 """ 586 @param tempx: The x data of fit line 587 @param tempy: The y data of fit line 588 @param xminView: the lower bound of fitting range 589 @param xminView: the upper bound of fitting range 590 @param xmin: the lowest value of data to fit to the line 591 @param xmax: the highest value of data to fit to the line 592 """ 593 # Saving value to redisplay in Fit Dialog when it is opened again 583 594 self.Avalue,self.Bvalue,self.ErrAvalue,self.ErrBvalue,self.Chivalue=func 584 595 self.xminView=xminView 596 self.xmaxView=xmaxView 597 self.xmin= xmin 598 self.xmax= xmax 599 #In case need to change the range of data plotted 585 600 list =[] 586 601 list = self.graph.returnPlottable() … … 588 603 #item.onFitRange(xminView,xmaxView) 589 604 item.onFitRange(None,None) 590 self.xminView=xminView 591 self.xmaxView=xmaxView 592 self.xmin= xmin 593 self.xmax= xmax 605 594 606 # Create new data plottable with result 595 607 self.fit_result.x =[] … … 600 612 self.fit_result.dy=None 601 613 #Load the view with the new values 602 self.fit_result.reset_view() 614 self.fit_result.reset_view() 615 # Add the new plottable to the graph 603 616 self.graph.add(self.fit_result) 604 605 617 self.graph.render(self) 606 618 self.subplot.figure.canvas.draw_idle() 607 #self.graph.delete(plottable)619 608 620 609 621 def onResetGraph(self,event): 622 """ 623 Reset the graph by plotting the full range of data 624 """ 610 625 list =[] 611 626 list = self.graph.returnPlottable()
Note: See TracChangeset
for help on using the changeset viewer.