Jorge Scandaliaris <jorgesmbox-ml@...83...> writes:
> 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.
Well, I haven't solved this problem yet, but it seems that the add_collection()
method is not the one at fault. It looks like the lasso widget I am using to
selct the regions is returning for the fourth region the same vertices than for
the third one.
Well, definitely I was wrong at my initial guess. It turns out the problem was a
race condition in the LassoManager class handling the Lasso widget. Putting a
few print statements here and there revealed the problem: I had two callback
functions competing against each other, one called by the lasso widget and the
other connected to mouse release event. One of them was setting a variable used
by the other. My guess is I (mis)used an old version of the lasso_demo, because
when I re visited the example section yesterday, I realized the lasso_demo had
no callback connected to the mouse release event.
I write this as a reference, hoping it can help someboby in the future.