In the real world:

I have a underground pipeline which has just been laid.
A surveyor has come along and taken shots to the top-of-pipe at each join along that whole pipeline.


I have brought those surveyed points into QGIS: each point has an elevation.
I have created a polyline representing the pipeline, using the points as nodes, starting at chainage 00 and continuing until the end of the pipeline.

enter image description here


I want to see a longitudinal section of the pipeline, by selecting a particular polyline at a time.


  • I don't want to rasterise/rasterize anything.
  • I don't want to use a DEM.
  • I DO want to use the elevation on the points, along with the pipeline polyline to create my longitudinal section.


I have tried all (or just about all) QGIS plug-ins that create a longitudinal section, with no overall joy.

  • I think I want a scatter-plot of Chainage (x-axis) and Elevation (y-axis).
  • I think I need the ability to change the X:Y ratio of the chart so it doesn't matter if the pipeline is 10 metres long or 10 kilometres long and - I can show some vertical exaggeration.

Is there a simple way to do this without the answer being "...you can just write a Python script..."?

1 Answer 1


I would recommand to use DataPlotly Plugin (https://github.com/ghtmtt/DataPlotly) for that. You can use the selected points or all of them. In the example below I've used the x-coordinate of each point versus the z value (elevation).

enter image description here

  • DataPlotly did the job! Thanks, EuroJam. It could be me, but I may have found an issue with how DataPlotly draws my graph (?) My table has the fields <OBJECTID> and <ORDERID>. <OBJECTID> was generated when the survey points were exported from the Survey software into a .SHP file and is the order the survey points were captured in the field. <ORDERID> is the order I want the graph line drawn (it is different to <OBJECTID>). DataPlotly appears to draw the graph in the order the points were added to the table, which is not the order of how I want the graph to draw.
    – GS10X
    Oct 18, 2021 at 23:22
  • I deleted the first column <OBJECTID>: no change. I deleted the <ORDERID> (which became the first column): no change. The issue is the line is plotted in this order: 2 | 1 | 3 | 4 | 5 | 6 | 7 | 9 | 8 | 10 ..., and not 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10... and I think it can only be based on the order they were added to the table, regardless of any changes to the attributes. Is there a way to alter the order of records in QGIS, or is there something I have missed?
    – GS10X
    Oct 18, 2021 at 23:23
  • 1
    In DataPlotly you can select the 2 attributes for plotting. in the example above I generated a new column first with the x value of the coordinates. this can be done with the field calculator (docs.qgis.org/3.16/en/docs/user_manual/working_with_vector/…) and the expression $x or with a processing tool (northrivergeographic.com/qgis-adding-x-y-coordinate)
    – eurojam
    Oct 19, 2021 at 4:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.