I would like to insert a series of vertical lines to divide up a line chart. The figure below shows the chart so far, but instead of the orange diamonds I want vertical lines that go from top to bottom of the figure. What's the easiest/best way to do this?

Context: this is a trust-region optimization problem showing the parameter evolution, and I want to show at what points my low-fidelity model is being updated. The vertical position of the orange dots shows the parameter value at which the model was retrained, but I don't care about this information - I just want to show it everywhere vertically with a thin line.

Current Line Chart


1 Answer 1


I would add an extra variable, that goes between the max and min of your other variables and only changes value when your method changes, and, thus, connects them as a sum of step functions. In some plotting packages, you can use NaN in between to plot nothing and only plot the vertical lines (MATLAB works like this). I don’t know if Paraview does.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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