# Area under a curve.

**URL:** <https://forum.knime.com/t/area-under-a-curve/48666>\
**Category:** KNIME Analytics Platform\
**Created:** [November 5, 2022, 6:22pm UTC](https://forum.knime.com/t/area-under-a-curve/48666 "2022-11-05T18:22:53Z")\
**Posts on this page:** 1\
**Showing post:** 6

<div class="post-metadata">

**Author:** ![mlauber71](https://forum-cdn.knime.com/user_avatar/forum.knime.com/mlauber71/32/73590_2.png) [@mlauber71](https://forum.knime.com/u/mlauber71)\
**Post date:** [November 9, 2022, 7:03pm UTC](https://forum.knime.com/t/area-under-a-curve/48666/6 "2022-11-09T19:03:33Z")

</div>

@Gimli OK I hope I got what you want. I converted the Python code from two Stackoverflow threads ([1](https://stackoverflow.com/questions/64760180/numpy-numerical-integration-with-integration-limits), [2](https://stackoverflow.com/questions/71816054/python-trapz-numerical-integration-giving-a-negative-value)) into a small KNIME workflow. You might want to check if you could adapt that.

You would enter the data and the variables and the numeric borders

 ![image](https://forum-cdn.knime.com/uploads/default/original/3X/a/7/a716806ada11209d0985be757e54012faf3bd336.png)

The lower part of the workflow would just use the x-axis min and max as a default. You might be able to tweak the design of the y-axis.

 ![image](https://forum-cdn.knime.com/uploads/default/original/3X/a/2/a2c431888d9da61e6f0b2ad51a8dfd3d1a28873b.png)

> **[calculate and illustrate integrals with Python – mlauber71](https://hub.knime.com/mlauber71/spaces/Public/latest/kn_example_python_numeric_integral~LIaMlrTKcJgnQVEs)**
>
> calculate and illustrate integrals with Python

[kn\_example\_python\_numeric\_integral.knwf](https://forum.knime.com/uploads/short-url/swz4j4uuskeCIuJ7hRrInfyz4I6.knwf) (341.2 KB)

---

_[View the full topic](https://forum.knime.com/t/area-under-a-curve/48666)._
