On Mon, Feb 7, 2011 at 7:09 PM, Jorge Scandaliaris <jorgesmbox-ml@yahoo.es> wrote:
Jorge Scandaliaris <jorgesmbox-ml@...> writes:

< snip >
> So, I modified the lasso_demo, increasing progressively the number polygons
> drawn. When I reached 100000 polygons, I was able to reproduce the problem.
> It's
> true that this a rather large number, but in my code it happens well below this
> number, maybe because I assign a different color and size to each polygon. So
> my
> previous observation that setting different sizes triggered the problem might
> not be the real picture. It seems as if I was hitting some sort of limit.
>
> Anyone would have a clue about what could be happening, or how can I try to
> debug this?
>

Well, I am bit desperate. The event problem definitely is related to the number
of polygons, circles, ellipses I draw, as well as to using different colors and
sizes. I don't even know how to start debugging this.

One step forward, though, is that I checked running the script directly from
python, instead of within ipython, and it is running as it should. This is with
more than 300 thousand ellipses, whereas within ipython it stops working with as
little as 2 thousand ellipses.

I am running both matplotlib and ipython development trees.

Any expert on how events work out there? And mpl-inpython interaction?

Thanks for any hints/suggestions.

jorges



Hmm, interesting observation.  There is very little in mpl that limits your ability to produce elements for plotting (which is probably why you were getting shrugs from the mailing list...).  However, ipython has various "tricks" for caching mpl elements, and can sometimes be a bit excessive in memory usage.  This could lead to some issues.

Now that you have identified ipython as the culprit, I would suggest taking this to the ipython list and seeing if they can better identify the problem for you.

Ben Root