On Sun, Sep 20, 2009 at 9:35 PM, John Hunter <jdh2...@gmail.com> wrote:

> where myInstance is an object of the type you expect to pass in.  As
> long as you have registered a converter from type(myInstance) ->
> ConversionInterface, you can now specify the default limits through
> the ConversionInterface.default_limits method::
>
>   �...@staticmethod
>    def default_units(x, axis):
>        'return the default unit for x or None for the given axis'
>        return None

This is a typo: I should be referring to the default_limits attribute
of AxisInfo.  Instead, I pasted in the default_units method of the
conversion interface

> As an example in matplotlib.dates, we choose an arbitrary interval,
> which while arbitrary avoids the 0..1 problem we have been having::
>
> class DateConverter(units.ConversionInterface):
>    """The units are equivalent to the timezone."""
>
>   �...@staticmethod
>    def axisinfo(unit, axis):
>        'return the unit AxisInfo'
>        # make sure that the axis does not start at 0
>
>        majloc = AutoDateLocator(tz=unit)
>        majfmt = AutoDateFormatter(majloc, tz=unit)
>        datemin = datetime.date(2000, 1, 1)
>        datemax = datetime.date(2010, 1, 1)
>
>        return units.AxisInfo( majloc=majloc, majfmt=majfmt, label='',
>                               default_limits=(datemin, datemax))


This is the correct way to specify default_limits

JDH

------------------------------------------------------------------------------
Come build with us! The BlackBerry&reg; Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9&#45;12, 2009. Register now&#33;
http://p.sf.net/sfu/devconf
_______________________________________________
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel

Reply via email to