Changeset 46693050 in sasview for guitools/PlotPanel.py
- Timestamp:
- Apr 23, 2008 12:36:40 PM (16 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:
- 863607a
- Parents:
- 35891ce
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
guitools/PlotPanel.py
r35891ce r46693050 64 64 # keep track if the previous transformation of x and y in Property dialog 65 65 self.prevXtrans =" " 66 66 67 self.prevYtrans =" " 67 68 … … 343 344 344 345 if (self.xscales=="log10(x)" ): 345 item.transform_x( transform.toX, transform.errTo LogX )346 item.transform_x( transform.toX, transform.errToX ) 346 347 self.set_xscale("log") 347 348 name, units = item.get_xaxis() 349 item.check_data_Plottable() 348 350 self.graph.xaxis("Log10 %s" % name, "%s^{-1}" % units) 349 351 … … 364 366 self.set_yscale("log") 365 367 name, units = item.get_yaxis() 368 #item.check_data_Plottable() 366 369 self.graph.yaxis("Log10 %s" % name, "%s^{-1}" % units) 367 370 … … 392 395 393 396 if ( self.yscales =="ln(y*x^(2))"): 394 item.transform_y( transform.to YX2 ,transform.errToLogYX2 )397 item.transform_y( transform.toLogYX2 ,transform.errToLogYX2 ) 395 398 self.set_yscale("linear") 396 399 yname, yunits = item.get_yaxis() … … 415 418 self.set_yscale("linear") 416 419 name, units = item.get_yaxis() 417 self.graph.yaxis(" Log %s" % name, "%s^{-1}" % units)420 self.graph.yaxis("$Log %s$" % name, "%s^{-1}" % units) 418 421 #item.name = self.yscales+" vs " +self.xscales 419 422 self.prevXtrans = self.xscales … … 422 425 self.graph.render(self) 423 426 self.subplot.figure.canvas.draw_idle() 424 def onFitDisplay(self, plottable): 427 428 def onFitDisplay(self, plottable,xmin,xmax): 425 429 """ 426 430 Add a new plottable into the graph .In this case this plottable will be used … … 428 432 @param plottable: the plottable to plot 429 433 """ 434 list =[] 435 tempx=[] 436 tempy=[] 437 tempdx=[] 438 tempdy=[] 439 #Stored plotted plottable in a new plottable 440 list = self.graph.returnPlottable() 441 if len(list.keys())>0: 442 for item in list: 443 if self.graph.isPlotted(item)== True: 444 x,y,dx,dy = item.returnValuesOfView() 445 if((min(x) < xmin )and( max(x) > xmax ))\ 446 or ((min(x) <= xmin )and( max(x) > xmax ))\ 447 or((min(x) < xmin )and( max(x) >= xmax )): 448 item.reducedXrange(xmin,xmax) 449 else: 450 item.originalXrange() 451 452 453 #Add the data to fit 430 454 plottable.reset_view() 431 455 self.graph.add(plottable) … … 434 458 self.subplot.figure.canvas.draw_idle() 435 459 self.graph.delete(plottable) 460 436 461 437 462
Note: See TracChangeset
for help on using the changeset viewer.