From: Michael D. <md...@st...> - 2008-06-05 16:02:52
|
This happens because the axes rectangle is rounded to the nearest pixels by (essentially, hand-waving over the details) doing (int)x0, (int)y0, (int)x1, (int)y1 where x0, y0, x1, y1 are the bounds of the box, whereas images are rounded to the nearest pixels by: (int)x0, (int)y0, (int)x0 + (int)width, (int)y0 + (int)height This should be fixable, but the implementation details make it a little tricky. I'm looking into this and will get back to you. Cheers, Mike Stan West wrote: > Hi. When I generate an AxesImage with, say, imshow(array([[0, 1], [1, > 0]])), a one-pixel gap sometimes appears between the image and the bottom > and/or right edges of the axis frame. The gap is sometimes shaded, as if by > anti-aliasing. The presence and shading of the gap depends on the axis > size, figure size, and figure dpi. In particular, the gap comes and goes as > I resize the figure. I've observed this using the WXAgg and TkAgg backends > under matplotlib 0.98.0. > > I checked the trackers and mailing list archives but found no previous > mention of this behavior. > > I looked into image.py but didn't readily see what might be responsible. > Would someone in the know be willing to investigate? Many thanks in > advance. > > > > ------------------------------------------------------------------------- > Check out the new SourceForge.net Marketplace. > It's the best place to buy or sell services for > just about anything Open Source. > http://sourceforge.net/services/buy/index.php > _______________________________________________ > Matplotlib-devel mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-devel > -- Michael Droettboom Science Software Branch Operations and Engineering Division Space Telescope Science Institute Operated by AURA for NASA |