From: Ryan M. <rm...@gm...> - 2008-12-05 15:59:22
|
Eric Firing wrote: > Ryan May wrote: >> Now, what about dates? I'm having problems using dates for the x-axis >> for fill_between. I know I can use date2num on my array, but I was >> wonder if there was some magic I could add to the fill_between code. > > Magic is the operative word. It is sprinkled like pixie dust throughout > mpl. You may be able to figure it out by looking at the code for other > functions that do support units. You could look for recent commits by > Ted Drain, if I remember correctly, and by John, both of whom fill gaps > in units handling every now and then. > > For example, note this line at the top of scatter: > > self._process_unit_info(xdata=x, ydata=y, kwargs=kwargs) Well, combine all that pixie dust with a few wonderful thoughts, and we should all be flying like Peter Pan! :) Seriously, thanks for the pointer. _process_unit_info() combined with convert_[x|y]units() made it work. Old example and my own code here both work. Checked into r6497. Thanks, Ryan -- Ryan May Graduate Research Assistant School of Meteorology University of Oklahoma |