enthought / enthought/chaco

ImagePlot panning issue at edge when zoomed in

Open
#198 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
305
Forks
97
PR merge metrics
No merged PRs in 30d

Description

After zooming in an image and panning so that image is almost outside the plot region, but only has 2 rows or columns visible, the image is drawn incorrectly, so the first row or column is duplicated across the entire plot region. Attached 2 screenshots to show when the problem appears - a Pan that makes 2.5 pixel columns visible is fine, but when the plot region contains >0 and <2 pixel columns the first column is stretched to fill the plot.

The plot in the screenshots was simply imshow('capitol.jpg') but seems to affect all ImagePlots.

![panok](https://cloud.githubusercontent.com/assets/770066/3064320/1dd570e2-e251-11e3-89d9-d399e7967187.png)
![panbug](https://cloud.githubusercontent.com/assets/770066/3064321/22ec1c2a-e251-11e3-9da0-566930a717d2.png)

I'm currently investigating. The problem appears to be in _calc_zoom_coords in image_plot.py as the gc_rect it returns does look spurious in these cases.

Working through the maths now and will submit a pull request when I get to the bottom of it.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.