MaxWell
MaxWell

Reputation: 7

Gnuplot parametric and data?

I have a file with some x, y data in a file and I want to plot it as well as a parametric function that the should follow in the same graph.

How could I do it?

Upvotes: 0

Views: 498

Answers (1)

Ethan
Ethan

Reputation: 15093

A parametric plot can always be restructured to use an explicit sampling of the control variable t, indicated by the pseudo-filename '+'.

parametric:

plot A(t), B(t)

sampled:

plot '+' using (A($1)):(B($1))

You can easily mix this with data plots. The range of the sampled control variable t need not be the same as the x range of the data plot.

plot 'file1.dat' with points, [t=0:2*pi] '+' using (A($1)):(B($1)) with lines

Upvotes: 2

Related Questions