# plotting a 3d vector field from a list

I have imported data to a list as below.

nn = Import["df.dat", "Table"];


nn is a 100 by 4 matrix which shows a 3D director field in 100 different points in x-y plane (the vectors are 3d, but their origins are in a 2D plane). To be more clear, $$nn[[3, i]]$$ shows the component of the vector originated at point 3 in the space. $$i=1,2,3$$ show the x,y,z component of the vector and i=4 shows the length of the vector.

Also, these 100 points in the 2D plane are arranged on a 10 by 10 square with equal distance.

I really appreciate it if someone can help me to visualize this vector field in an appropriate way.

Below is the first 5 lines of the df.dat file.

0.121963 -0.224769 0.966749 0.340097
0.095170 -0.243081 0.965326 0.340081
0.068667 -0.261505 0.962756 0.340071
0.042826 -0.279722 0.959125 0.340065
0.017990 -0.297426 0.954575 0.340059


The first line corresponds to the point (x,y)=(0,0), the second point to the point (x,y)=(1,0) and so on. The 12th point corresponds to (x,y)=(2,1), the 14th point to (x,y)=(3,1) and so on.

• Please give a minimal example of your df.dat. Commented Dec 20, 2020 at 11:48
• did you see this? mathematica.stackexchange.com/a/26523/1089 Commented Dec 20, 2020 at 11:49
• @cvgmt I don't know how to upload it here. Commented Dec 20, 2020 at 12:07
• Just post some part of your data as code. Commented Dec 20, 2020 at 12:12
• added now. @cvgmt Commented Dec 20, 2020 at 12:15

vecs = Table[{1, 1, 1} i/10, {i, 100}];