# Connecting points as lines

**URL:** https://discourse.paraview.org/t/connecting-points-as-lines/9583
**Category:** ParaView Support
**Created:** [May 7, 2022, 5:52am UTC](https://discourse.paraview.org/t/connecting-points-as-lines/9583 "2022-05-07T05:52:17Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![Crown](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/c/8dc957/32.png) [@Crown](https://discourse.paraview.org/u/Crown)
#### Post date: [May 7, 2022, 5:52am UTC](https://discourse.paraview.org/t/connecting-points-as-lines/9583/1 "2022-05-07T05:52:17Z")

</div>

Hi,

I have several 2D lines and I want to display them together as shown in the attachment. Is it possible to convert points to lines?  
Thank you

 ![Screenshot 2022-05-07 004932](https://discourse.paraview.org/uploads/default/original/2X/7/76d9a697fd2fcfbe44f9493336d9f5479a27693d.jpeg)

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mwestphal/32/17_2.png) [@mwestphal](https://discourse.paraview.org/u/mwestphal)
#### Post date: [May 7, 2022, 9:10am UTC](https://discourse.paraview.org/t/connecting-points-as-lines/9583/2 "2022-05-07T09:10:37Z")

</div>

Hi @Crown

Do you have a way to identify which point is part of which line in the data ?  
Are the points ordered ?

Best,

---

<div class="post-metadata">

### Author: ![Crown](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/c/8dc957/32.png) [@Crown](https://discourse.paraview.org/u/Crown)
#### Post date: [May 7, 2022, 1:56pm UTC](https://discourse.paraview.org/t/connecting-points-as-lines/9583/3 "2022-05-07T13:56:54Z")

</div>

Hi Mathieu,

Thank you for your response. Unfortunately, I don’t know how to identify which point is part of which line.

Regards

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mwestphal/32/17_2.png) [@mwestphal](https://discourse.paraview.org/u/mwestphal)
#### Post date: [May 7, 2022, 2:33pm UTC](https://discourse.paraview.org/t/connecting-points-as-lines/9583/4 "2022-05-07T14:33:36Z")

</div>

Then im afraid paraview cant either

---

<div class="post-metadata">

### Author: ![Venke](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/v/6de8d8/32.png) [@Venke](https://discourse.paraview.org/u/Venke)
#### Post date: [May 9, 2022, 7:07am UTC](https://discourse.paraview.org/t/connecting-points-as-lines/9583/5 "2022-05-09T07:07:07Z")

</div>

From your screenshot, it should be easy to separate the profiles by their x-coordinate. (I am sure it can easily be done using Python in ParaView. As I am more familiar with code in octave/matlab, personally I would separate the data and interpolate it to something regular, e.g. netcdf, externally. Alternatively, you could triangulate the separated profiles and generate e.g. vtk/vtp)

---

<div class="post-metadata">

### Author: ![Crown](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/c/8dc957/32.png) [@Crown](https://discourse.paraview.org/u/Crown)
#### Post date: [May 13, 2022, 5:49pm UTC](https://discourse.paraview.org/t/connecting-points-as-lines/9583/6 "2022-05-13T17:49:23Z")

</div>

Hi Mathieu,

I can identify which point is part of which line in the data, what can I do to connect those points?

Thank you

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mwestphal/32/17_2.png) [@mwestphal](https://discourse.paraview.org/u/mwestphal)
#### Post date: [May 13, 2022, 5:59pm UTC](https://discourse.paraview.org/t/connecting-points-as-lines/9583/7 "2022-05-13T17:59:45Z")

</div>

You will need then to implement a programmable filter that uses this logic to ordonnate the points into lines.

[https://docs.paraview.org/en/latest/ReferenceManual/pythonProgrammableFilter.html](https://docs.paraview.org/en/latest/ReferenceManual/pythonProgrammableFilter.html)

Hth.

---

<div class="post-metadata">

### Author: ![Crown](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/c/8dc957/32.png) [@Crown](https://discourse.paraview.org/u/Crown)
#### Post date: [May 13, 2022, 6:01pm UTC](https://discourse.paraview.org/t/connecting-points-as-lines/9583/8 "2022-05-13T18:01:35Z")

</div>

Thank you for your quick response.

Best
