# How to make a line graph

**URL:** <https://forums.solar2d.com/t/how-to-make-a-line-graph/346729>\
**Category:** Advanced Graphics\
**Created:** [February 17, 2018, 6:43pm UTC](https://forums.solar2d.com/t/how-to-make-a-line-graph/346729 "2018-02-17T18:43:03Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![lorik.dominic](https://forums.solar2d.com/letter_avatar_proxy/v4/letter/l/8e7dd6/32.png) [@lorik.dominic](https://forums.solar2d.com/u/lorik.dominic)\
**Post date:** [February 17, 2018, 6:43pm UTC](https://forums.solar2d.com/t/how-to-make-a-line-graph/346729/1 "2018-02-17T18:43:03Z")

</div>

Hi all,

I was wondering how to make a line graph. For example, graphing y = sin(x).&nbsp; I also want to be able to remove the grid if possible and turn the graph into an object that can be moved around.&nbsp;

Thanks!

---

<div class="post-metadata">

**Author:** ![sporkfin](https://forums.solar2d.com/user_avatar/forums.solar2d.com/sporkfin/32/30_2.png) [@sporkfin](https://forums.solar2d.com/u/sporkfin)\
**Post date:** [February 20, 2018, 12:45am UTC](https://forums.solar2d.com/t/how-to-make-a-line-graph/346729/2 "2018-02-20T00:45:43Z")

</div>

Explore Edge Shape or “Chain” Bodies

[https://docs.coronalabs.com/api/library/physics/addBody.html](https://docs.coronalabs.com/api/library/physics/addBody.html)

You can use this with your vertices to make graph and use a touch joint to move it.

[https://docs.coronalabs.com/api/library/physics/newJoint.html](https://docs.coronalabs.com/api/library/physics/newJoint.html)

Enclosing the chain so it meets itself might be helpful - I can’t quite remember, but explore those features a little

---

<div class="post-metadata">

**Author:** ![lorik.dominic](https://forums.solar2d.com/letter_avatar_proxy/v4/letter/l/8e7dd6/32.png) [@lorik.dominic](https://forums.solar2d.com/u/lorik.dominic)\
**Post date:** [February 20, 2018, 12:57am UTC](https://forums.solar2d.com/t/how-to-make-a-line-graph/346729/3 "2018-02-20T00:57:01Z")

</div>

> [@sporkfin](#):
>
> Explore Edge Shape or “Chain” Bodies
> 
> [https://docs.coronalabs.com/api/library/physics/addBody.html](https://docs.coronalabs.com/api/library/physics/addBody.html)
> 
> You can use this with your vertices to make graph and use a touch joint to move it.
> 
> [https://docs.coronalabs.com/api/library/physics/newJoint.html](https://docs.coronalabs.com/api/library/physics/newJoint.html)
> 
> Enclosing the chain so it meets itself might be helpful - I can’t quite remember, but explore those features a little

Thank you very much sporkfin!

---

<div class="post-metadata">

**Author:** ![sporkfin](https://forums.solar2d.com/user_avatar/forums.solar2d.com/sporkfin/32/30_2.png) [@sporkfin](https://forums.solar2d.com/u/sporkfin)\
**Post date:** [February 20, 2018, 12:45am UTC](https://forums.solar2d.com/t/how-to-make-a-line-graph/346729/4 "2018-02-20T00:45:43Z")

</div>

Explore Edge Shape or “Chain” Bodies

[https://docs.coronalabs.com/api/library/physics/addBody.html](https://docs.coronalabs.com/api/library/physics/addBody.html)

You can use this with your vertices to make graph and use a touch joint to move it.

[https://docs.coronalabs.com/api/library/physics/newJoint.html](https://docs.coronalabs.com/api/library/physics/newJoint.html)

Enclosing the chain so it meets itself might be helpful - I can’t quite remember, but explore those features a little

---

<div class="post-metadata">

**Author:** ![lorik.dominic](https://forums.solar2d.com/letter_avatar_proxy/v4/letter/l/8e7dd6/32.png) [@lorik.dominic](https://forums.solar2d.com/u/lorik.dominic)\
**Post date:** [February 20, 2018, 12:57am UTC](https://forums.solar2d.com/t/how-to-make-a-line-graph/346729/5 "2018-02-20T00:57:01Z")

</div>

> [@sporkfin](#):
>
> Explore Edge Shape or “Chain” Bodies
> 
> [https://docs.coronalabs.com/api/library/physics/addBody.html](https://docs.coronalabs.com/api/library/physics/addBody.html)
> 
> You can use this with your vertices to make graph and use a touch joint to move it.
> 
> [https://docs.coronalabs.com/api/library/physics/newJoint.html](https://docs.coronalabs.com/api/library/physics/newJoint.html)
> 
> Enclosing the chain so it meets itself might be helpful - I can’t quite remember, but explore those features a little

Thank you very much sporkfin!
