# How to fit a curve in Paraview

**URL:** https://discourse.paraview.org/t/how-to-fit-a-curve-in-paraview/11387
**Category:** ParaView Support
**Created:** [February 13, 2023, 8:17am UTC](https://discourse.paraview.org/t/how-to-fit-a-curve-in-paraview/11387 "2023-02-13T08:17:01Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![potato](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/p/a6a055/32.png) [@potato](https://discourse.paraview.org/u/potato)
#### Post date: [February 13, 2023, 8:17am UTC](https://discourse.paraview.org/t/how-to-fit-a-curve-in-paraview/11387/1 "2023-02-13T08:17:01Z")

</div>

Hello everyone! I use Paraview to visualize my compution result. And I make a contour in my Paraview.This is my result.However, I want to fit curve which is above the green line as a quartic polynomial. I am confused about how to do that. I also want to know if I can extract the point coordinate on this curve so that I can fit this curve using python or matlab. thanks a lot!

 ![78IMZKRJM4XZDY}Hello everyone! I use Paraview to visualize my compution result. And I make a contour in my Paraview.This is my result.However, I want to fit curve which is above the green line as a quartic polynomial. I am confused about how to do that. I also want to know if I can extract the point coordinate on this curve so that I can fit this curve using python or matlab. thanks a lot! 2E7EF](https://discourse.paraview.org/uploads/default/original/2X/e/e88a4b3886396130a086fab103feacb649866898.png)

---

<div class="post-metadata">

### Author: ![nicolas.vuaille](https://discourse.paraview.org/user_avatar/discourse.paraview.org/nicolas.vuaille/32/5873_2.png) [@nicolas.vuaille](https://discourse.paraview.org/u/nicolas.vuaille)
#### Post date: [February 13, 2023, 10:21am UTC](https://discourse.paraview.org/t/how-to-fit-a-curve-in-paraview/11387/3 "2023-02-13T10:21:42Z")

</div>

I think you should do that in two steps:

- cut your data to keep only the part of interest, with the `Clip` filter.
- use a `Programmable Filter` to manipulate the actual data (so coordinates).

See programmable filter documentation: [5. Programmable Filter — ParaView Documentation 5.11.0 documentation](https://docs.paraview.org/en/latest/ReferenceManual/pythonProgrammableFilter.html)

---

<div class="post-metadata">

### Author: ![potato](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/p/a6a055/32.png) [@potato](https://discourse.paraview.org/u/potato)
#### Post date: [February 13, 2023, 11:57pm UTC](https://discourse.paraview.org/t/how-to-fit-a-curve-in-paraview/11387/4 "2023-02-13T23:57:00Z")

</div>

Thanks a lot! I have made it!
