quadrilateral meshes

John, Alex added facets to pcolormesh today. Eventually we

    > would like pcolormesh to be a drop-in replacement for
    > pcolor, only faster. We are also working on performance
    > improvements.

    > The pcolormesh function can easily identify rectilinear
    > grids (e.g., when given x,y as vector rather than array) and
    > use either NonUniformImage or imshow as appropriate. The
    > facets should be easy enough to draw on top if needed,
    > though obviously the result will be slower.

One might be able to add the faceting as an image overlay, or blend
the faceting into the existing image, which would solve the
performance problem. The more we can do with images the better, since
we get interpolation and superior performance. Ideally, we would have
a single rectilinear image object that supports interpolation,
nonuniform (but rectilinear) griding, and optional faceting. This
would cover every case except non-rectangular quadrilateral meshes,
which is where your and Alex's recent contribution would kick in. The
image machinery is almost there already: all that is lacking is a
faceting option and a consistent interface.

    > In the end we will have two functions: pcolor and imshow,
    > with pcolor accepting x,y,z and imshow only z.

This looks like the right approach -- in the end it will be nice to
reduce the clutter of too many alternatives. The only problem with
switching the underlying object (Image vs NonuniformImage vs QuadMesh
vs PolygonCollection) is that it would be difficult to deal with the
return object in a consistent way. If we had the object described
above, we might imagine living with just two functions: imshow on
steroids that handles all rectilinear cases, and quadmesh for the
others. pcolor would then simply be a thin interface to imshow for
matlab with different kwargs for matlab compatibility.

Thanks for your help; looking forward to the updates...

JDH

Another common case is a skewed mesh, which could be implemented
as a simple image transformation.

- Paul

···

On Jan 19, 2006, at 9:33 PM, John Hunter wrote:

    > John, Alex added facets to pcolormesh today. Eventually we
    > would like pcolormesh to be a drop-in replacement for
    > pcolor, only faster. We are also working on performance
    > improvements.

    > The pcolormesh function can easily identify rectilinear
    > grids (e.g., when given x,y as vector rather than array) and
    > use either NonUniformImage or imshow as appropriate. The
    > facets should be easy enough to draw on top if needed,
    > though obviously the result will be slower.

One might be able to add the faceting as an image overlay, or blend
the faceting into the existing image, which would solve the
performance problem. The more we can do with images the better, since
we get interpolation and superior performance. Ideally, we would have
a single rectilinear image object that supports interpolation,
nonuniform (but rectilinear) griding, and optional faceting. This
would cover every case except non-rectangular quadrilateral meshes,
which is where your and Alex's recent contribution would kick in.