enthought/chaco — pull request #144 by tonysyu (2013-10-30 17:21:26+00:00)
Title: Fix zooming in image plots with vertical orientation

Vertical image plots don't interact with the zoom tool correctly. Run the example below and use the scroll wheel to zoom out. As you zoom back in, the image jumps back and forth.

```python
from scipy.misc import lena

from enable.api import Component, ComponentEditor
from traits.api import HasTraits, Instance
from traitsui.api import UItem, View
from chaco.api import ArrayPlotData, Plot
from chaco.tools.api import PanTool, ZoomTool

class Demo(HasTraits):
plot = Instance(Component)

traits_view = View(
UItem('plot', editor=ComponentEditor(size=(600, 600))),
resizable=True
)

def _plot_default(self):
pd = ArrayPlotData(imagedata=lena())
plot = Plot(pd, orientation='v')
plot.img_plot("imagedata")

plot.tools.append(PanTool(plot, constrain_key="shift"))
plot.overlays.append(ZoomTool(component=plot, always_on=False))
return plot

demo = Demo()

if __name__ == "__main__":
demo.configure_traits()
```