enthought/chaco — pull request #147 by tonysyu (2013-11-07 18:15:05+00:00)
Title: Refactor image plot

While adding some plotting capabilities to an `ImagePlot` subclass (see https://github.com/enthought/geolibs/pull/43), I ended up having to refactor `ImagePlot` quite a bit.

This PR cleans up some of the coordinate transforms in `ImagePlot` and fixes an issue with negative screen sizes (see https://github.com/enthought/enable/issues/109). I've also added tests, but I'm not sure how robust this testing is: It requires precise pixel positions in the rendered image. (This positioning is achieved using a tweaked index grid, tweaked plot bounds, and slicing some "extra" rows/columns off the rendered image. Probably a bit fragile :P)