I have a strange problem. It seems to me it is related to mpl.axes.Axes.add_collection(), but I am too lost to be sure. I have a script for visualizing certain aspects of images, built upon many bits and pieces I found on the matplotlib example section. It basically lets me view an image from two different perspectives, that is, its usual representation and another one, for example a scatter plot of red versus green. That part is working, but I added later on the possibility to select a group of points in either representation and see them highlighted in both with the same color. That part works OK, up to the third selected region, but when I select the fourth something strange happens, as I don't see this region in any of the subplots. I represent the regions as collections, and add them to subplot with add_collection() method. The collections themselves are created ok, and the get_children() method even report having them, but they are not visible. What surprises me the most is that it is always the fourth selected region the one showing this problem, no matter how big or small are the previous ones.I tried to make a scaled down version of the script exhibiting the problem, but it works ok then. I could post the code here, but then I'll force you to go through a 300 lines script. How do you go about debugging these sort of problems?
As a side note, the doc tells that add_collection() returns the collection, when it actually returns a NoneType object.
BTW, I am using the gtk backend, ipython is started with ipython -gthread -pylab. Matplotlib version is 0.98.5.3