# Drawing graphs using lineTo functiond and arrays

**URL:** <https://forum.kirupa.com/t/drawing-graphs-using-lineto-functiond-and-arrays/281457>\
**Category:** Uncategorized\
**Created:** [February 9, 2009, 3:53pm UTC](https://forum.kirupa.com/t/drawing-graphs-using-lineto-functiond-and-arrays/281457 "2009-02-09T15:53:12Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![AgentOrange](https://avatars.discourse-cdn.com/v4/letter/a/edb3f5/32.png) [@AgentOrange](https://forum.kirupa.com/u/AgentOrange)\
**Post date:** [February 9, 2009, 3:53pm UTC](https://forum.kirupa.com/t/drawing-graphs-using-lineto-functiond-and-arrays/281457/1 "2009-02-09T15:53:12Z")

</div>

Hi guys and gals,

I have managed to draw a simple graph with the lineTo function pulling in data from an array.

The only problem I have is that the line joins the last data point to the first creating a closed shape instead just a ‘wiggly’ line

If anyone can help me solve this I would be eternally grateful

Best  
Steve
