# Exists a way to draw a plot function?

**URL:** <https://forum.defold.com/t/exists-a-way-to-draw-a-plot-function/6375>\
**Category:** Questions\
**Created:** [March 16, 2017, 8:09am UTC](https://forum.defold.com/t/exists-a-way-to-draw-a-plot-function/6375 "2017-03-16T08:09:24Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![donati.sergio](https://forum-defold.b-cdn.net/letter_avatar_proxy/v4/letter/d/5f9b8f/32.png) [@donati.sergio](https://forum.defold.com/u/donati.sergio)\
**Post date:** [March 16, 2017, 8:09am UTC](https://forum.defold.com/t/exists-a-way-to-draw-a-plot-function/6375/1 "2017-03-16T08:09:24Z")

</div>

Hi, as title say, my question is: there is a way for draw a function with axis programmatically?

I need to show some results to user in Cartesian coordinate system.

---

<div class="post-metadata">

**Author:** ![britzl](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/britzl/32/23_2.png) [@britzl](https://forum.defold.com/u/britzl)\
**Post date:** [March 16, 2017, 8:20am UTC](https://forum.defold.com/t/exists-a-way-to-draw-a-plot-function/6375/2 "2017-03-16T08:20:49Z")

</div>

There is no proper API for drawing lines, circles and other geometric shapes, but you could probably use [draw\_line](http://www.defold.com/ref/render/#draw_line:start_point-end_point-color) to achieve what you need.

---

<div class="post-metadata">

**Author:** ![Pkeod](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/pkeod/32/606_2.png) [@Pkeod](https://forum.defold.com/u/Pkeod)\
**Post date:** [March 16, 2017, 11:21am UTC](https://forum.defold.com/t/exists-a-way-to-draw-a-plot-function/6375/3 "2017-03-16T11:21:03Z")

</div>

You could probably do what you want to do with shaders and render targets too. Can you describe / illustrate more of what you want to accomplish?

---

<div class="post-metadata">

**Author:** ![Mathias\_Westerdahl](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/mathias_westerdahl/32/228_2.png) [@Mathias\_Westerdahl](https://forum.defold.com/u/Mathias_Westerdahl)\
**Post date:** [March 16, 2017, 12:07pm UTC](https://forum.defold.com/t/exists-a-way-to-draw-a-plot-function/6375/4 "2017-03-16T12:07:59Z")

</div>

In the next release, we are adding some functionality to easier work with “buffers”. These buffers allow for easier communication between extensions and Lua, and we use them for instance to pass large data such as video or camera images from an extension to the engine (via Lua). The next release will allow you to do this directly from Lua.

Here is [an example](https://forum.defold.com/t/native-extensions/4946/20) of this in action: creating a buffer (with pixels), and overwriting the texture of a sprite (the entire atlas)
