Changeset 06290c8 in sasview
- Timestamp:
- Jun 10, 2008 7:27:23 AM (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:
- a55fac1
- Parents:
- df25521
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
guitools/PlotPanel.py
rdf25521 r06290c8 205 205 xdelta = self.xFinal -self.xInit 206 206 ydelta = self.yFinal -self.yInit 207 207 if self.xscale=='log': 208 #xdelta = math.log10(self.xFinal - self.xInit) 209 xdelta = math.log10(self.xFinal) -math.log10(self.xInit) 210 if self.yscale=='log': 211 ydelta = math.log10(self.yFinal) -math.log10(self.yInit) 208 212 self.dragHelper(xdelta,ydelta) 209 213 else: 214 self.dragHelper(0,0) 210 215 def onMouseMotion(self,event): 211 216 if self.leftdown==True: … … 221 226 newlo,newhi= lo- xdelta, hi- xdelta 222 227 if self.xscale=='log': 223 if newlo > 0:224 newlo= math.log10( newlo)225 if newhi > 0:226 newhi= math.log10( newhi)228 if lo > 0: 229 newlo= math.log10(lo)-xdelta 230 if hi > 0: 231 newhi= math.log10(hi)-xdelta 227 232 if self.xscale=='log': 228 233 ax.set_xlim(math.pow(10,newlo),math.pow(10,newhi)) … … 235 240 newlo,newhi= lo- ydelta, hi- ydelta 236 241 if self.yscale=='log': 237 if newlo > 0: 238 newlo= math.log10(newlo) 239 if newhi > 0: 240 newhi= math.log10(newhi) 242 if lo > 0: 243 newlo= math.log10(lo)-ydelta 244 if hi > 0: 245 newhi= math.log10(hi)-ydelta 246 print "new lo %f and new hi %f"%(newlo,newhi) 241 247 if self.yscale=='log': 242 248 ax.set_ylim(math.pow(10,newlo),math.pow(10,newhi))
Note: See TracChangeset
for help on using the changeset viewer.