John Hunter wrote: > The use case (and we can debate whether this is worth the extra overhead) > > ax.plot(inches) > ax.set_xlim(cms)
I'll put my two cents into that debate: My first thought is: wow! that is putting WAY too much into a plotting routine! My second thought is: on the other hand, that is very cool. 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). What that means is that the first step is to get that package complete and robust. Using it for this kind of MPL functionality may be a good way to put it to the test. In between, with a good Quantities package, it's not that big a deal to put the unit conversion in the hands of user code. The user code would simple need to be something like: ax.plot(values.rescale('cm') ax.set_xlim(limits.rescale('cm')) a bit klunkier, but very clear. Explicit is better than implicit... > ax.plot(cms) > > the first line would be updated to cm and both would be plotted in cm. this is a little two implicit for me -- I'd rather specify the units explicitly, rather than have the last data added determine it for me. ax.set_xunit('cm') I'd probably have it default to the first unit used. -Chris -- Christopher Barker, Ph.D. Oceanographer Emergency Response Division NOAA/NOS/OR&R (206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA 98115 (206) 526-6317 main reception chris.bar...@noaa.gov ------------------------------------------------------------------------------ Crystal Reports - New Free Runtime and 30 Day Trial Check out the new simplified licensing option that enables unlimited royalty-free distribution of the report engine for externally facing server and web deployment. http://p.sf.net/sfu/businessobjects _______________________________________________ Matplotlib-devel mailing list Matplotlib-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-devel