Changeset dfca3de in sasview
- Timestamp:
- Apr 15, 2008 5:01:45 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:
- 3aa7074
- Parents:
- 88e7d08
- Location:
- guitools
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
guitools/PlotPanel.py
r831149e rdfca3de 61 61 self.xscales ="x" 62 62 self.yscales ="log10(y)" 63 self.viewModel ="--" 63 64 # keep track if the previous transformation of x and y in Property dialog 64 65 self.prevXtrans =" " … … 67 68 def returnTrans(self): 68 69 return self.xscales,self.yscales 69 70 70 71 def setTrans(self,xtrans,ytrans): 71 72 """ … … 75 76 self.prevXtrans =xtrans 76 77 self.prevYtrans =ytrans 77 78 78 79 def onFitting(self, event): 79 80 """ … … 97 98 from PropertyDialog import Properties 98 99 dial = Properties(self, -1, 'Properties') 99 dial.setValues( self.prevXtrans, self.prevYtrans )100 dial.setValues( self.prevXtrans, self.prevYtrans,self.viewModel ) 100 101 if dial.ShowModal() == wx.ID_OK: 101 self.xscales, self.yscales = dial.getValues() 102 self.xscales, self.yscales,self.viewModel = dial.getValues() 103 if self.viewModel =="Guinier lny vs x^(2)": 104 self.xscales="x^(2)" 105 self.yscales="ln(y)" 106 self.viewModel = "--" 107 dial.setValues( self.xscales, self.yscales,self.viewModel ) 102 108 self._onEVT_FUNC_PROPERTY() 103 109 dial.Destroy() … … 396 402 xname, xunits = item.get_xaxis() 397 403 self.graph.yaxis("%s%s^{4}" % (yname,xname), "%s^{-1}%s^{-4}" % (yunits,xunits)) 398 404 405 if ( self.viewModel == "Guinier lny vs x^(2)"): 406 407 item.transform_x( transform.toX2,transform.errToX2 ) 408 self.set_xscale('linear') 409 name, units = item.get_xaxis() 410 self.graph.xaxis("%s^{2}" % name, "%s^{-2}" % units) 411 412 item.transform_y( transform.toLogX, transform.errToLogX ) 413 self.set_yscale("linear") 414 name, units = item.get_yaxis() 415 self.graph.yaxis("%s" % name, "%s^{-1}" % units) 416 399 417 self.prevXtrans = self.xscales 400 418 self.prevYtrans = self.yscales -
guitools/PropertyDialog.py
r88e7d08 rdfca3de 62 62 63 63 # type of view or model used 64 self.view.SetValue("Guinier lny vs x^(2)") 65 self.view.Insert("Guinier lny vs x^(2)",0) 64 self.view.SetValue("--") 65 self.view.Insert("--",0) 66 self.view.Insert("Guinier lny vs x^(2)",1) 66 67 panel.SetSizer(sizer) 67 68 self.SetSizer(vbox) … … 69 70 70 71 71 def setValues(self,x,y ):72 return self.xvalue.SetValue(x), self.yvalue.SetValue(y) 72 def setValues(self,x,y,view): 73 return self.xvalue.SetValue(x), self.yvalue.SetValue(y),self.view.SetValue(view) 73 74 74 75 def getValues(self): 75 return self.xvalue.GetValue(), self.yvalue.GetValue() 76 return self.xvalue.GetValue(), self.yvalue.GetValue(),self.view.GetValue() 77 76 78 77 79 if __name__ == "__main__":
Note: See TracChangeset
for help on using the changeset viewer.