Hi all,

I have a derived class that I copy-pasted from the web somewhere to hide
some tick labels:

class MinorLogTickFormatter(matplotlib.ticker.LogFormatter):
    # Format log scale with 10^ labels. Only if show one label over two.
    def __call__(self, val, pos=None):
        exponent =
int(numpy.floor(numpy.log(abs(val))/numpy.log(self._base)))
        base = int(val / 10.0**exponent)
        isDecade = self.is_decade(exponent)
        if not isDecade and self.labelOnlyBase:
            return ''
        if (not (base == 2 or base == 4 or base == 6 or base == 8)): # Only
show these ones.
            return ''
        label = r"$%d \times 10^{%d}$" % (base, exponent)
        return label

pylab.gca().xaxis.set_minor_formatter(MinorLogTickFormatter())

I've beend using this since many months, but with matplotlib 1.0.1 I can't
anymore. It complains about the is_decade() function:
isDecade = self.is_decade(exponent)
AttributeError: MinorLogTickFormatter instance has no attribute 'is_decade'

How can I fix that?

Thanks!

Nicolas
------------------------------------------------------------------------------
Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)!
Finally, a world-class log management solution at an even better price-free!
Download using promo code Free_Logger_4_Dev2Dev. Offer expires 
February 28th, so secure your free ArcSight Logger TODAY! 
http://p.sf.net/sfu/arcsight-sfd2d
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to