Drawing line segments

Shaun Jackman sjackman at bcgsc.ca
Tue Jun 17 16:21:19 CDT 2008


I want to draw a number of scattered line segments in a plot. I have a matrix
with four columns: [x0 y0 x1 y1]. Is there a better/faster approach than
calling `line' in a for loop? I'd rather format the data in a way that I can
draw the scattered line-segment plot with a single call to either plot or line.
If it makes any difference, in this particular case all my lines are
horizontal, so y0 == y1, for any given line segment.

Thanks,
Shaun



More information about the Help-octave mailing list