# Plot over sorted line

**URL:** https://discourse.paraview.org/t/plot-over-sorted-line/13629
**Category:** ParaView Support
**Created:** [January 3, 2024, 2:54pm UTC](https://discourse.paraview.org/t/plot-over-sorted-line/13629 "2024-01-03T14:54:34Z")
**Posts on this page:** 1
**Showing post:** 2

<div class="post-metadata">

### Author: ![Kenneth\_Moreland](https://discourse.paraview.org/user_avatar/discourse.paraview.org/kenneth_moreland/32/15033_2.png) [@Kenneth\_Moreland](https://discourse.paraview.org/u/Kenneth_Moreland)
#### Post date: [January 3, 2024, 4:01pm UTC](https://discourse.paraview.org/t/plot-over-sorted-line/13629/2 "2024-01-03T16:01:46Z")

</div>

The short answer is you can run the `Plot On Sorted Lines` filter on your contour lines to order the points to follow the line. Then save the result as a CSV file.

Demonstrating this is always easier when you post your data (not just the images), but as a proxy I did a contour on a smoothed Mandelbrot fractal in ParaView to generate a wavy line. Here is the state file and screen shot.

[contour-plot.pvsm](https://discourse.paraview.org/uploads/short-url/4aizhiBM0MERtub6Hp2txqvzonw.pvsm) (655.3 KB)

 ![Screen Shot 2024-01-03 at 10.51.26 AM](https://discourse.paraview.org/uploads/default/original/2X/f/ff81dce67a8433d36f4f249b45956e197198b08a.png)

As you can see, after making the contour plot, I ran the `Plot On Sorted Lines` filter. ParaView makes its own XY plot for that (which is the original point of the filter). I changed the X and Y axes to follow the X and Y coordinates to verify the plot is correct.

After this, you can use save data ![Screen Shot 2024-01-03 at 10.58.33 AM](https://discourse.paraview.org/uploads/default/original/2X/b/b8a4a1bffc90ea6851cfa73478d526cae43e8472.png) to write out a CSV file on the points. You can then plot the X and Y coordinates in any program you like. Here is a screenshot of me doing that in Excel.

 ![Screen Shot 2024-01-03 at 10.51.20 AM](https://discourse.paraview.org/uploads/default/original/2X/7/7f975d2c62646204f280941725a1e54079a09efe.png)

This problem was also discussed on this post: [How do I obtain contour lines in a sequence. - #11 by Kenneth\_Moreland](https://discourse.paraview.org/t/how-do-i-obtain-contour-lines-in-a-sequence/8530/11)

---

_[View the full topic](https://discourse.paraview.org/t/plot-over-sorted-line/13629)._
