# Plot over line not working properly with vtkNonOverlappingAMR data

**URL:** https://discourse.paraview.org/t/plot-over-line-not-working-properly-with-vtknonoverlappingamr-data/14922
**Category:** ParaView Support
**Created:** [June 25, 2024, 7:23pm UTC](https://discourse.paraview.org/t/plot-over-line-not-working-properly-with-vtknonoverlappingamr-data/14922 "2024-06-25T19:23:47Z")
**Posts on this page:** 11
**Page:** 1

<div class="post-metadata">

### Author: ![pkestene](https://discourse.paraview.org/user_avatar/discourse.paraview.org/pkestene/32/12850_2.png) [@pkestene](https://discourse.paraview.org/u/pkestene)
#### Post date: [June 25, 2024, 7:23pm UTC](https://discourse.paraview.org/t/plot-over-line-not-working-properly-with-vtknonoverlappingamr-data/14922/1 "2024-06-25T19:23:47Z")

</div>

Hello,

I noticed that “Plot Over Line” filter is not working properly when applied to vtkNonOverlappingAMR : the plot appears to be trucated to the very first AMR block encountered.

Is this a known limitations ? (I was not able to find a reference stating this filter is not working well with this kind of data). In such a case, would it be hard to fix ?

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: [June 26, 2024, 11:10am UTC](https://discourse.paraview.org/t/plot-over-line-not-working-properly-with-vtknonoverlappingamr-data/14922/2 "2024-06-26T11:10:46Z")

</div>

I’m unable to reproduce using latest developement version, which version are you using ? Can you share your data ?

---

<div class="post-metadata">

### Author: ![pkestene](https://discourse.paraview.org/user_avatar/discourse.paraview.org/pkestene/32/12850_2.png) [@pkestene](https://discourse.paraview.org/u/pkestene)
#### Post date: [June 26, 2024, 12:43pm UTC](https://discourse.paraview.org/t/plot-over-line-not-working-properly-with-vtknonoverlappingamr-data/14922/3 "2024-06-26T12:43:40Z")

</div>

Hello Mathieu,

Testing data are generated using the following small piece of code:  
[https://github.com/pkestene/vtk\_amr\_examples](https://github.com/pkestene/vtk_amr_examples)

I was testing under ubuntu 22.04, using paraview 5.10.0-RC1 (the one from ubuntu).

I’ve just tested a nightly build of paraview 5.12 (ParaView-5.12.20240626-MPI-Linux-Python3.10-x86\_64), things have improved but there is still a problem when I select “Sample Uniformly” the plot is still truncated while the 2 others choices are working fine for me, they display the full plot.

With 5.10.0-RC1 all choices where providing a truncated plot (i can provide a screenshot if it necessary).

I was using

---

<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: [June 26, 2024, 1:16pm UTC](https://discourse.paraview.org/t/plot-over-line-not-working-properly-with-vtknonoverlappingamr-data/14922/4 "2024-06-26T13:16:50Z")

</div>

Works fine here with ParaView 5.12.0 binary release on Linux:

 ![image](https://discourse.paraview.org/uploads/default/original/2X/a/a257199dd40702afe90d3e6842a7adfc3bf431b7.png)

---

<div class="post-metadata">

### Author: ![pkestene](https://discourse.paraview.org/user_avatar/discourse.paraview.org/pkestene/32/12850_2.png) [@pkestene](https://discourse.paraview.org/u/pkestene)
#### Post date: [June 26, 2024, 1:20pm UTC](https://discourse.paraview.org/t/plot-over-line-not-working-properly-with-vtknonoverlappingamr-data/14922/5 "2024-06-26T13:20:22Z")

</div>

No, it doesn’t.  
If you selected the diagonal, you cross 2 blocks with each 4 differents values; you should have 8 steps, and x axis should go from 0 to 8\*sqrt(2) = 11.3. Here your x-axis is truncated to a little bit less than 6 (that is about 11.3/2).

---

<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: [June 26, 2024, 1:23pm UTC](https://discourse.paraview.org/t/plot-over-line-not-working-properly-with-vtknonoverlappingamr-data/14922/6 "2024-06-26T13:23:36Z")

</div>

Indeed, results seems incorrect, do not hesitate to open an issue: [https://gitlab.kitware.com/paraview/paraview/-/issues](https://gitlab.kitware.com/paraview/paraview/-/issues)

---

<div class="post-metadata">

### Author: ![pkestene](https://discourse.paraview.org/user_avatar/discourse.paraview.org/pkestene/32/12850_2.png) [@pkestene](https://discourse.paraview.org/u/pkestene)
#### Post date: [June 26, 2024, 1:40pm UTC](https://discourse.paraview.org/t/plot-over-line-not-working-properly-with-vtknonoverlappingamr-data/14922/7 "2024-06-26T13:40:19Z")

</div>

ok, thanks.

---

<div class="post-metadata">

### Author: ![leon.victor](https://discourse.paraview.org/user_avatar/discourse.paraview.org/leon.victor/32/14500_2.png) [@leon.victor](https://discourse.paraview.org/u/leon.victor)
#### Post date: [July 8, 2024, 8:46am UTC](https://discourse.paraview.org/t/plot-over-line-not-working-properly-with-vtknonoverlappingamr-data/14922/8 "2024-07-08T08:46:54Z")

</div>

Hi @pkestene , I’m trying to reproduce this issue but your github repo is no longer available. Could you please share it again ?  
Thanks!

---

<div class="post-metadata">

### Author: ![pkestene](https://discourse.paraview.org/user_avatar/discourse.paraview.org/pkestene/32/12850_2.png) [@pkestene](https://discourse.paraview.org/u/pkestene)
#### Post date: [July 8, 2024, 9:06am UTC](https://discourse.paraview.org/t/plot-over-line-not-working-properly-with-vtknonoverlappingamr-data/14922/9 "2024-07-08T09:06:43Z")

</div>

hello Léon,  
here are the data:  
[tmp.tgz](https://discourse.paraview.org/uploads/short-url/jqX70FUCSVbEGBPGOzy14dOQCJv.tgz) (2.5 KB).  
thanks.

---

<div class="post-metadata">

### Author: ![leon.victor](https://discourse.paraview.org/user_avatar/discourse.paraview.org/leon.victor/32/14500_2.png) [@leon.victor](https://discourse.paraview.org/u/leon.victor)
#### Post date: [July 29, 2024, 7:56am UTC](https://discourse.paraview.org/t/plot-over-line-not-working-properly-with-vtknonoverlappingamr-data/14922/10 "2024-07-29T07:56:20Z")

</div>

Hi @pkestene,  
The problem was due to a wrong handling of 2D images by VTK in some cases which vtkNonOverlappingAMR relied on. It should now be fixed in both VTK and ParaView masters ([https://gitlab.kitware.com/vtk/vtk/-/merge\_requests/11333](https://gitlab.kitware.com/vtk/vtk/-/merge_requests/11333))

Thank you for providing your data, it definitely helped identify the origin of the bug !  
Let us know if you still encounter your problem

---

<div class="post-metadata">

### Author: ![pkestene](https://discourse.paraview.org/user_avatar/discourse.paraview.org/pkestene/32/12850_2.png) [@pkestene](https://discourse.paraview.org/u/pkestene)
#### Post date: [July 29, 2024, 12:41pm UTC](https://discourse.paraview.org/t/plot-over-line-not-working-properly-with-vtknonoverlappingamr-data/14922/11 "2024-07-29T12:41:53Z")

</div>

Thanks, I tested with a paraview nightly build, it works perfectly as expected.
