# Colouring area under a polygonal curve?

**URL:** <https://cl.desmos.com/t/colouring-area-under-a-polygonal-curve/2947>\
**Category:** Questions\
**Created:** [March 19, 2021, 7:35am UTC](https://cl.desmos.com/t/colouring-area-under-a-polygonal-curve/2947 "2021-03-19T07:35:44Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dandy](https://avatars.discourse-cdn.com/v4/letter/d/ecccb3/32.png) [@Dandy](https://cl.desmos.com/u/Dandy)\
**Post date:** [March 19, 2021, 7:35am UTC](https://cl.desmos.com/t/colouring-area-under-a-polygonal-curve/2947/1 "2021-03-19T07:35:44Z")

</div>

Hi, I would like to color three separate curvatures under my polygonal curve but don’t know how to.

> **[1](https://www.desmos.com/calculator/nlnjcdu3v5)**

I want a color the area under (0.1,1.8) to (0.9, 1.617)

```
                                 Then from (1.2,2) to (4.2,1.89)
                                     and the reminder another color

```

Any help?

---

<div class="post-metadata">

**Author:** ![Susan\_Lauer](https://yyz1.discourse-cdn.com/flex031/user_avatar/cl.desmos.com/susan_lauer/32/1832_2.png) [@Susan\_Lauer](https://cl.desmos.com/u/Susan_Lauer)\
**Post date:** [March 19, 2021, 2:14pm UTC](https://cl.desmos.com/t/colouring-area-under-a-polygonal-curve/2947/2 "2021-03-19T14:14:43Z")

</div>

You’ll need more precise points along your graph for better polygons, but you could do something like this:

 ![image](https://canada1.discourse-cdn.com/flex031/uploads/desmos/original/2X/c/c92cb1015816de43f0971ad19e5fbd11b419a908.png)

---

<div class="post-metadata">

**Author:** ![Daniel\_Grubbs](https://yyz1.discourse-cdn.com/flex031/user_avatar/cl.desmos.com/daniel_grubbs/32/719_2.png) [@Daniel\_Grubbs](https://cl.desmos.com/u/Daniel_Grubbs)\
**Post date:** [March 19, 2021, 4:22pm UTC](https://cl.desmos.com/t/colouring-area-under-a-polygonal-curve/2947/3 "2021-03-19T16:22:39Z")

</div>

I’d give all your “Data Collection” points names. (e.g. `P_0=(0.3,b_0)`)  
I started it for you. I named P\_0 through P\_29. I made a list function, L, in the Polygon Functions folder. Then, just pass to points as variables to create the list of points surrounded by polygon( ) to create the shading. You can then select your colors. There’s two examples in there. You can change or add points as you see fit.

> **[1](https://www.desmos.com/calculator/xhbhhma7nf)**

I edited and made a second function M that you can just put numbers into that indexes a list of the points (I put P29 first). A little quicker to alter to see what you’re using.
