Changeset 5789654 in sasview for guitools/plottables.py
- Timestamp:
- Apr 7, 2008 6:31:09 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:
- 8742751
- Parents:
- fcaada5
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
guitools/plottables.py
rf63f5ff r5789654 174 174 if plottable in self.plottables: 175 175 del self.plottables[plottable] 176 if self.color > 0: 177 self.color = self.color -1 178 else: 179 self.color =0 176 180 177 181 def reset(self): … … 312 316 self._yaxis = name 313 317 self._yunit = units 318 def get_xaxis(self): 319 return self._xaxis, self._xunit 320 def get_yaxis(self): 321 return self._yaxis, self._yunit 314 322 315 323 @classmethod … … 336 344 def __init__(self): 337 345 self.view = View() 346 self._xaxis = "" 347 self._xunit = "" 348 self._yaxis = "" 349 self._yunit = "" 350 338 351 def set_View(self,x,y): 339 352 """ Load View """ … … 345 358 """ Reload view with new value to plot""" 346 359 self.view = self.View(self.x, self.y, self.dx, self.dy) 347 print "the value of view x",self.view.x 348 print "the value of view y",self.view.y 360 349 361 350 362 … … 379 391 self.view.transform_y(func, errfunc, self.y, self.dy) 380 392 381 def return XvalueOfView(self):393 def returnValuesOfView(self): 382 394 return self.view.returnXview() 383 395 … … 449 461 450 462 def returnXview(self): 451 return self.x 463 return self.x,self.y,self.dx,self.dy 464 452 465 453 466 class Data1D(Plottable): … … 468 481 self.dx = dx 469 482 self.dy = dy 470 483 self.xaxis( 'q', 'A') 484 self.yaxis( 'intensity', 'cm') 471 485 self.view = self.View(self.x, self.y, self.dx, self.dy) 472 486 … … 497 511 The title is the name that will show up on the legend. 498 512 """ 513 self.name= "theo" 499 514 self.x = x 500 515 self.y = y 501 516 self.dy = dy 502 #Alina:added517 503 518 self.view = self.View(self.x, self.y, None, self.dy) 504 519 def render(self,plot,**kw): … … 508 523 def changed(self): 509 524 return False 510 525 @classmethod 526 def labels(cls, collection): 527 """Build a label mostly unique within a collection""" 528 map = {} 529 for item in collection: 530 #map[item] = label(item, collection) 531 map[item] = r"$\rm{%s}$" % item.name 532 return map 533 511 534 512 535
Note: See TracChangeset
for help on using the changeset viewer.