Jordan> Also, a question: why use collection objects?  The
    Jordan> implimentation doesn't strike me as being much faster
    Jordan> rendering wise, but maybe I'm wrong.  Is it just so all
    Jordan> the objects can be manipulated all at once by changing the
Jordan> state of the collection?
collections aren't as fast as they can be, mainly because they use
sequences of python objects rather than numeric arrays, so all the
object coercion still has to be done.  Their primary efficiency is the
avoidance of repeated object creation and their attendant function
calls and setting the graphics contect.

Eg, if you create 10000 Line2D objects, you will pay for 10000 object
creations, 10000 separate transformations, 10000 calls to the renderer
draw function, and 10000 settings of the gc state.
Cool, that makes sense. Another question: what plot types generate 10000 Line2D objects? I can see quiver doing something like that if one plots an 100x100 grid, but it seems to me the resulting arrows would be totally unreadable.

I hope I'm not coming across as snotty here. I really love matplotlib, it's all I use nowadays, and quite an amazing piece of code. I want to find someplace where I can start adding functionality, but the backend is really confusing me. I guess I'm trying to figure out what bits of the code are design decisions and what bits are there because they worked, but aren't necessarily the best solution.
    Jordan> Also, is there any particular
    Jordan> reason the collections only accept verts or segments,
    Jordan> instead of being able to just send it a patch or line
    Jordan> object and have the collection object extract the relevant
    Jordan> data?

Currently the collections are designed to be flexible (eg, each polygon can
have separate color and width properties) and reasonably fast.  They
are not particularly easy to use, so some helper functionality would
be useful.
Cool, so I take this to mean it would be helpful to add some code to the __init__() funcs of the collection objects so they can accept objects as well as vertex data? Cause I think I could do that.

So, are the basic drawing primitives in matplotlib Line2D, LineCollection, Patch, and PolyCollection, with QuadMesh a special case so that pcolor renders fast?

Jordan


-------------------------------------------------------
All the advantages of Linux Managed Hosting--Without the Cost and Risk!
Fully trained technicians. The highest number of Red Hat certifications in
the hosting industry. Fanatical Support. Click to learn more
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=107521&bid=248729&dat=121642
_______________________________________________
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel

Reply via email to