title: How to draw a line through points given by x-y-coordinates in an array?
body: <p>I have a text file whose content looks like that:</p>
  
  <pre><code>    {x:-391.41900634766,y:35.793998718262},         
      {x:-391.15798950195,y:35.486000061035},
      {x:-390.94049072266,y:35.178001403809},
      {x:-390.67950439453,y:34.869998931885},
      {x:-390.46200561523,y:34.583999633789},
      {x:-390.20098876953,y:34.276000976562},
      {x:-389.94000244141,y:33.967998504639},
      {x:-389.67901611328,y:33.659999847412},
      {x:-389.46148681641,y:33.374000549316},
      {x:-289.20050048828,y:23.06600189209},
      {x:-288.93951416016,y:22.779998779297},
      {x:-288.67849731445,y:22.47200012207},
  </code></pre>
  
  <p>Each x-y-pair denotes the coordinates of a point in the x-y-plane. Using PHP or Javascript, how can I extract the coordinates from that file and plot a line through all points?</p>