2

I have a text file (named lorenz-phase.txt, as you can probably guess it is the solution to the Lorenz equations) that contains data of the format:

1 1 1
1.01257 1.25992 0.984891
1.04882 1.524 0.973114
1.10721 1.79831 0.965159
1.18687 2.08854 0.961737

and so forth, where the first column is my x values, the second column is my y values and the third column is my z values. I would like to plot a 3D line plot of this data using gnuplot. Is this possible and how is it done? Google has not given me an answer on this front, as the plots I could find were when a parametric function describes the plot.

1 Answer 1

2

Use the splot command for 3d plots, and with lines for lines:

splot "lorenz-phase.txt" using 1:2:3 with lines

My first google result with keywords gnuplot 3d line is this one.

Sign up to request clarification or add additional context in comments.

2 Comments

How do I export the plot as an svg? I know how to with 2D plots as I have code for that, it is here.
Gnuplot uses the command plot for 2D plots and splot for 3D plots. The code for generating svg output is the same.

Your Answer

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

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.