On Wed, Jun 13, 2012 at 4:00 PM, Timothy Duly <timduly4@gmail.com> wrote:
Hello,

I am trying to make a simple pcolor plot with a datetime on the x-axis.  I am able to get a time label on the x-axis fine with a regular plot command, but it doesn't appear to work if you use pcolor.  This simple example below shows that it does not work.  Does anyone have any idea as to why a datetime can't go on a pcolor plot?  What is the best approach is to solve the problem?

Thanks,
Tim


It doesn't work because we probably never had a request for it and therefore never tested that case.  Testing it out with v1.1.1-rc2 shows that for pcolor(), first of all, it expects a numpy array for the input arrays (that should definitely be fixed) as opposed to a python array. Second, fixing that, there is an issue where the Path object in the pcolor object is expecting floating points for its vertices.  If one uses pcolormesh instead, right off the bat, there is a problem where it attempts to make a 2-D version of the 1-D input array, but because the 2-D array was created with default dtype, it is expecting something compatible with a float type.  Personally, I am not liking how pcolormesh is being inefficient with my input arrays and it should really be taking advantage of numpy broadcasting.

Could you please file a bug report on github for this issue with your code example?

Thanks!
Ben Root