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.
At least we warn, but warnings are only seen once, so not a very suitable mechanism