# Plot over line does not work with Cell Data or "CellDataToPointData"

**URL:** https://discourse.paraview.org/t/plot-over-line-does-not-work-with-cell-data-or-celldatatopointdata/16559
**Category:** ParaView Support
**Tags:** vtk
**Created:** [May 1, 2025, 1:53pm UTC](https://discourse.paraview.org/t/plot-over-line-does-not-work-with-cell-data-or-celldatatopointdata/16559 "2025-05-01T13:53:42Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![baranKucukcay](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/b/b5ac83/32.png) [@baranKucukcay](https://discourse.paraview.org/u/baranKucukcay)
#### Post date: [May 1, 2025, 1:53pm UTC](https://discourse.paraview.org/t/plot-over-line-does-not-work-with-cell-data-or-celldatatopointdata/16559/1 "2025-05-01T13:53:43Z")

</div>

Hello,

I developed a lid-driven cavity Navier-Stokes solver using a **collocated grid** and **finite volume method**. Later, I added a **VTK module** to the code to store the **velocity and pressure fields** at the mesh centers as **cell data**. The VTK output section of the code and an example output file is in the attachments

**The problem is:** I cannot extract data along the centerline using _“Plot Over Line”_. If the issue is related to it being **cell data** , I tried converting it to **point data** using _“Cell Data to Point Data”_, but _“Plot Over Line”_ still doesn’t work. When I use _“Resample to Image”_, it works, and I can plot the data. However, I suspect that _“Resample to Image”_ does not perform correct interpolation because it produces the same points as _“Cell Data to Point Data”_ but assigns different values to the same points.

Exporting to CSV or copying data from _“Spreadsheet View”_ is a workaround, but I want to plot the data **properly within ParaView**.  
[vtkPartOfTheCode.txt](https://discourse.paraview.org/uploads/short-url/7DpZXBWmtnHy7wFJONjd1y9Y1LL.txt) (1.9 KB)  
[colocated\_results.vtk](https://discourse.paraview.org/uploads/short-url/tmehAkUXHdaI8ij4K7h3OOL8pgu.vtk) (3.8 KB)

---

<div class="post-metadata">

### Author: ![baranKucukcay](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/b/b5ac83/32.png) [@baranKucukcay](https://discourse.paraview.org/u/baranKucukcay)
#### Post date: [May 2, 2025, 12:58am UTC](https://discourse.paraview.org/t/plot-over-line-does-not-work-with-cell-data-or-celldatatopointdata/16559/2 "2025-05-02T00:58:53Z")

</div>

After days of trying different approaches, I finally got Plot Over Line to work with cell data on my 2D geometry. The solution was simpler than I expected - just applying a Transform Filter fixed everything.

What’s interesting:

- It works even with tiny transformations (like moving the geometry by 0.001 units)
- You don’t need to convert cell data to point data anymore
- Even applying the filter without changing any transform values makes it work

I think there might be a bug here because the geometry’s actual position doesn’t seem to matter - just having the transform filter in the pipeline makes Plot Over Line work properly.

I’m planning to bring this up at the next ParaView Office Hours meeting. It’s one of those weird quirks that might need looking into.

---

<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 2, 2025, 9:03am UTC](https://discourse.paraview.org/t/plot-over-line-does-not-work-with-cell-data-or-celldatatopointdata/16559/3 "2025-05-02T09:03:29Z")

</div>

It looks like PlotOverLine does not work on RectilinearGrid, please open an issue: [https://gitlab.kitware.com/paraview/paraview/-/issues](https://gitlab.kitware.com/paraview/paraview/-/issues)

> just applying a Transform Filter fixed everything.

A transform make you rectilinear grid a unstructured grid, on which plot over line works.  
The “canonical” way to do that would be to use AppendDataset filter instead.

---

<div class="post-metadata">

### Author: ![baranKucukcay](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/b/b5ac83/32.png) [@baranKucukcay](https://discourse.paraview.org/u/baranKucukcay)
#### Post date: [May 2, 2025, 11:47am UTC](https://discourse.paraview.org/t/plot-over-line-does-not-work-with-cell-data-or-celldatatopointdata/16559/4 "2025-05-02T11:47:48Z")

</div>

When I apply AppendDataset filter, it only plots with “Sampling Uniformly” selection. When I select “Sample at Segment Centers” or “Sample at Cell Boundaries”, it does not work.

---

<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 2, 2025, 11:52am UTC](https://discourse.paraview.org/t/plot-over-line-does-not-work-with-cell-data-or-celldatatopointdata/16559/5 "2025-05-02T11:52:00Z")

</div>

Your unstructured grid contains only “Pixel” cells, which are not well supported by the PlotOverLine filter, please open an issue: [https://gitlab.kitware.com/paraview/paraview/-/issues](https://gitlab.kitware.com/paraview/paraview/-/issues)

Use Tetrahedralize filter to convert these pixels Into triangles to make the filter work as expected.

---

<div class="post-metadata">

### Author: ![baranKucukcay](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/b/b5ac83/32.png) [@baranKucukcay](https://discourse.paraview.org/u/baranKucukcay)
#### Post date: [May 2, 2025, 12:01pm UTC](https://discourse.paraview.org/t/plot-over-line-does-not-work-with-cell-data-or-celldatatopointdata/16559/6 "2025-05-02T12:01:07Z")

</div>

Tetrahedralize is a such a cool filter. But it does not make any difference compared to transform. Also, since my work is an academical study and generating a mesh is an important part of it, I cant work with Tetrahedralize filter because when I need tetrahedrals, I need to code it by myself. But still, such a cool filter.

I think I will continue with transform. I will open an issue soon.

Thank you for your help Mathieu!

---

<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 2, 2025, 12:02pm UTC](https://discourse.paraview.org/t/plot-over-line-does-not-work-with-cell-data-or-celldatatopointdata/16559/7 "2025-05-02T12:02:33Z")

</div>

Ha right, transforming with an angle also convert the pixel into quad, which works too, good point.
