Luca De Fusco
Luca De Fusco

Reputation: 27

three-dimensional plot of the vector field with gnuplot

I have a data file representing a vector field and would like to make a three dimensional plot with gnuplot.

The data set is something like this:

0.001    -0.002   0.004
0.003     0.007   -0.005

and so on

where the columns represent the Cartesian components of the vector.

How can I make the plot?

Upvotes: 0

Views: 3470

Answers (1)

Christoph
Christoph

Reputation: 48390

The plotting style vectors is for drawing vector fields. But that requires six values in 3D, with the meaning of x y z xdelta ydelta zdelta. Then you can draw with

splot 'file.txt' with vectors

To test with your data (don't know their meaning), you could plot the vectors along a line

splot 'file.txt' using ($0*0.01):(0):(0):1:2:3

Upvotes: 2

Related Questions