towards a poor man's texture map in mplot3d


I'm trying to get something like texture mapping to work. (I don't need
anything fancy transforms between texel location and image location,
though. I'm happy to specify just a 2D grid of pixel colors that appear
onto a rectangle positioned in 3D space.)

Given that, I made a demo based on pcolor which I think should do the
job with a little work. I based this mainly on
examples/mplot3d/, which is pretty close to this.
Here's my

Right now, though, running this results in the following traceback:

$ python
Traceback (most recent call last):
  File "", line 21, in <module>
    art3d.patch_collection_2d_to_3d(s, zdir="x")
line 301, in patch_collection_2d_to_3d
    col.set_3d_properties(zs, zdir)
line 279, in set_3d_properties
    xs, ys = zip(*self.get_offsets())
ValueError: need more than 0 values to unpack

Reinier -- can you comment on how the patch offsets are supposed to be
interpreted as x,y values in this context? From the docstring at
lib/matplotlib/, I read "*offsets* and *transOffset* are
used to translate the patch after rendering (default no offsets)". It's
not immediately clear to me how the offsets should then be resulting in
X,Y values for 3D plotting. Or is something else entirely going on here?
I'm happy to do some leg-work here if you point me in the right direction.