Hello,
I am trying to show many hundreds to a few thousand *independent* line
segments efficiently. I can of course make one call to plot() per
segment, but that is slooow and I am trying to keep up with a C
application generating the plot data.
As I read the docs for plot(), I can specify multiple points to be
connected together using array arguments, but in order to specify
multiple, independent, *disconnected* line segments in one call to plot()
I would have to use multiple sets of arguments like this:
plot(x1, y1, 'b-', x2, y2, 'r-', x3, y3, 'b-', . . .)
That is as slow as multiple calls to plot and leads to huge argument
lists.
What would be great would be the ability to specify a marker *list* that
maps to the segments, rather than just a marker string that is applied to
all segments in the list. Something like this:
plot([0, 1, 2, 3, 4], [2, 5, 7, 8, 9], ['b-', 'w-', 'b-', 'w-', 'b-'])
Then by changing the color of certain segments to the background color I
could effectively make many separate segments.
Any thoughts on the wisdom of this? Or a suggestion for doing this with
the current interface that didn't occur to me?
Rich