# Plot a 3D vector field from a file [duplicate]

I have a data file with six columns {x,y,z} and {ux,uy,uz} respectively, and I would like to plot the 3D vector field. http://www.mediafire.com/download/udoa61hu0m6itrc/campo.txt

I'm trying to do this,

te = Import["C:\\Users\\oliver\\Documents\\campo.txt",
"Table", "IgnoreEmptyLines" -> True];
x = te[[All, 1]];
y = te[[All, 2]];
z = te[[All, 3]];
ux = te[[All, 4]];
vy = te[[All, 5]];
wz = te[[All, 6]];
point = Transpose[{x, y, z}];
vel = Transpose[{ux, vy, wz}];

ListVectorPlot3D[Transpose[{point, vel}], PlotRange -> Full,VectorPoints -> All]


-

## marked as duplicate by Michael E2, m_goldberg, Sjoerd C. de Vries, Artes, R. M.♦Jul 13 '13 at 15:32

Try this and tell me why I do not see similarity: X = te[[;; 180, ;; 3]]; V = te[[;; 180, 4 ;; 6]]; Graphics3D[{Arrowheads@0.01, Arrow@Transpose[{X, X + V}], Red, Point@X}] – Kuba Jul 12 '13 at 19:02
I'm not sure, but it looks like the option VectorPoints -> All doesn't behave as described in the documentation of ListVectorPlot3D (2nd bullet of the Details and Options section). – Sjoerd C. de Vries Jul 12 '13 at 20:59
@SjoerdC.deVries did You get any plot with ListVectorPlot3D with whatever options? I've failed to create any with {{X,V}...} data type. – Kuba Jul 12 '13 at 21:05
@Kuba, I did that you said me and i get a plot with one disc, but the picture that i put , is of a set of disks, basically are circumferences displaced in z. – Oli Jul 12 '13 at 21:16

te = Import["campo.txt", "Table", "IgnoreEmptyLines" -> True];
X = te[[;; , ;; 3]];
V = te[[;; , 4 ;; 6]];

Graphics3D[{Arrowheads@.005, Arrow@Transpose[{X, X + .1 Normalize /@ V}]},
BoxRatios -> {2, 2, 7}, PlotRange -> All, ViewPoint -> {1.5, 1.5, 0},
ViewVertical -> {0, 1, 0}, Boxed -> False]


On Your image there are couple of vectors thicker than the rest. Creating plot with variable thickness of arrows will result with heavy model so lets extract only the lognest and add them.

Histogram[Norm /@ (V)] (*I've checked this to set threshold to 1.7*)
pos = Position[V, x_ /; Norm@x > 1.7, 1];

Graphics3D[{
Arrowheads@.005, Arrow@Transpose[{X, X + .1 Normalize /@ V}][[ ;; ]],

@Oli is te what it should be? Try reset the kernel and reimport the data. – Kuba Jul 12 '13 at 22:36
@Oli Import["campo.txt".. in Your case is different. Are You importing from right place. What error exactly are You getting? – Kuba Jul 12 '13 at 22:59