WIP: overhaul matplotlib imshow plugin for new data policy

See point 3 of #1266. 

Some of the new code is a little bit messy, so feedback welcome.
Is this The Right Thing To Do?  This is "magical" behavior, and could hide wrong computational results.