On Thu, May 21, 2009 at 2:20 PM, Christopher Barker <chris.bar...@noaa.gov> wrote: > John Hunter wrote: >> <chris.bar...@noaa.gov> wrote: >>> If it's going to be done, I think it really shouldn't be too MPL >>> specific -- it should be built on a good (and hopefully eventually >>> widely used) unit-array system, perhaps like Darren Dale's Quantities >>> package (there are quite a few other that should be looked at also). >> >> This is not how it works -- we will not be assuming any units package. >> Rather, we provide an interface where any units package can be used >> with mpl. > > Fair enough, but you still need to require a particular API to a unit-ed > object, which it no so different.
No, this is incorrect. The object can have any API it wants. The person who wants to add support for that object registers the object type with a converter class for that object. The converter class can be entirely external to the class, as in the datetime example I posted, so the object's API is not exposed to mpl. This is the crucial distinction. The converter class at a minimum must know how to convert the object to a sequence of floats. JDH JDH ------------------------------------------------------------------------------ Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT is a gathering of tech-side developers & brand creativity professionals. Meet the minds behind Google Creative Lab, Visual Complexity, Processing, & iPhoneDevCamp asthey present alongside digital heavyweights like Barbarian Group, R/GA, & Big Spaceship. http://www.creativitycat.com _______________________________________________ Matplotlib-devel mailing list Matplotlib-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-devel