title: I would like to plot line segments from a doubly nested list and use interact from ipwidgets to control which sublist is plotted
body: <p>I would like to plot line segments from a doubly nested list using interact from ipwidgets that control the list indices of the first layer of a nested list. </p>
  
  <pre><code>X_Points = [[[X1,X2], [X3, X4], [X5, X6]], [[x1, x2], [x3, x4]]] 
  Y_Points = [[[Y1,Y2], [Y3, Y4], [Y5, Y6]], [[y1, y2], [y3, y4]]] 
  </code></pre>
  
  <p>so the line-segments will be</p>
  
  <pre><code>(X1, Y1)-(X2, Y2), (X3, Y3)-(X4, Y4), (X5, Y5)-(X5, Y5), (x1, y1)-(x2, y2), (x3, y3)-(x4, y4)
  </code></pre>
  
  <p>in total, we have 5 line segments and
  when I use the interact from ipwidget I should control which sublist is being plotted
  for example: If I use 0 in the interact the first 3 line segments from the sublist should be plotted and if I use 1 then the next 2 line segments from the sublist should be plotted. 
  I'm having a hard time in plotting this. I tried to do it a couple of ways but was ultimately unsuccessful. Any help is appreciated. Thank you!</p>