Пример #1
0
 def locator(self):
     # {{{
     import pylab as pyl, numpy as np
     ndecs = np.log10(np.max(self.values) / np.min(self.values))
     if ndecs < 1.2: return pyl.LogLocator(subs=[1., 2., 4., 7.])
     elif ndecs < 3.: return pyl.LogLocator(subs=[1., 3.])
     else: return pyl.LogLocator()
Пример #2
0
 def locator(self):
     # {{{
     '''Returns a matplotlib locator object for use in plotting.'''
     import pylab as pyl
     scl = self.plotatts.get('plotscale', 'linear')
     if scl == 'log': return pyl.LogLocator()
     else: return pyl.AutoLocator()