This question is an extension of an original question regarding line segments.
In regards to the original question, the issue of drawing line segments from a tsv has been solved with this script (thanks to @VividD). Here is the data for drawing two line segments from a tsv:
x0 y0 x1 y1 weight
0.5 0.5 0.2 0.2 2
0.25 0.35 0.7 0.8 1
Now, I am trying to draw paths (or polylines) with an unknown number of vertices. This would require the script to iterate through each row, looking for the number of columns to add to the data for each path. I'm unaware of how to do this because the scripts I've been working with assumption that the programmer knows the column names (d.close
, d.date
, etc.).
x0 y0 x1 y1 x2 y2 weight
0.5 0.5 0.2 0.2 2
0.25 0.35 0.7 0.8 0.5 0.6 1
Does anyone have an idea for how to iterate through the example above, drawing paths for each row of data?