|
From: Joel H. <yo...@if...> - 2007-02-01 16:09:41
|
Hi! I believe I've found a bug in matplotlib which manifests after=20 imshow(img, aspect=3D'auto') when only a small portion of the image is=20 displayed, e.g: when (xmax-xmin) << img.shape[1]. The effect of the bug=20 is that the transparency for the entire image seems to vary, seemingly=20 as a periodic funtion of (xmax-xmin). Explicitly setting the alpha=20 channel for each pixel has no effect. The attached script generates a random image of a certain size, and=20 plots it in four different subplots. The only thing that differs between=20 the subplots are slight variations in x_max. The four subplots are labele= d: 1) The background image is visible. 2) The background image is not visible! 3) The background image is faded! 4) The background image is again visible! which reflects the actual result on my system. As the subplots are=20 scaled (for example by resizing the window), the intensity then varies=20 in a periodic manner in each of the subplots. The expected result is of course that the background should be fully=20 visible in all subplots. Additional details: $ python test.py --verbose-helpful matplotlib data path /usr/lib/python2.4/site-packages/matplotlib/mpl-data $HOME=3D/home/bioinfo/yohell CONFIGDIR=3D/home/bioinfo/yohell/.matplotlib loaded rc file=20 /usr/lib/python2.4/site-packages/matplotlib/mpl-data/matplotlibrc matplotlib version 0.87.7 verbose.level helpful interactive is False platform is linux2 numerix numpy 1.0 font search path ['/usr/lib/python2.4/site-packages/matplotlib/mpl-data'] loaded ttfcache file /home/bioinfo/yohell/.matplotlib/ttffont.cache backend WXAgg version 2.6.1.2pre In this example I used the WXAgg backend, but GTKAgg shows the same=20 results. I've also reproduced this bug on a WinXP machine. Thanks for an excellent plotting package! /Joel Hedlund Link=F6ping University |