Based on a quick look, I think it would be easy to make LineCollection 
and PolyCollection accept a numerix array in place of [(x,y), (x,y), 
...] for each line segment or polygon; specifically, this could replaced 
by an N x 2 array, where the first column would be x and the second 
would be y.  Backwards compatibility could be maintained easily.  This 
would eliminate quite a bit of useless conversion back and forth among 
lists, tuples, and arrays.  As it is, each sequence of sequences is 
converted to a pair of arrays in backend_bases, and typically it started 
out as either a 2-D numerix array or a pair of 1-D arrays in the code 
that is calling the collection constructor.

Using a single 2-D array makes it easier to determine whether one is 
dealing with 'old-style' inputs or 'new-style' inputs, but it might 
still be reasonable to allow [X, Y] instead or in addition, where X and 
Y are 1-D numerix arrays.

Any objections or alternative suggestions?

Eric


_______________________________________________
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel

Reply via email to