所以ListVectorPlot3D
希望向量的数组。你有什么是$ {x_i,y_i,z_i,Vx_i,Vy_i,Vz_i} $元素的列表。如果您的x,y和z点都布置在常规网格上,则可以重新排列元素以使其格式正确,但数据不在常规网格中。为了解决这个问题,我将创建一个线性插值函数并使用VectorPlot3D
。此外,你的数据有一些重复的点,所以我不得不删除它们。
我下载的数据为CSV文件,
data = [email protected]
Import["~/Downloads/Cell Well data - Sheet1.csv"][[2 ;;]];
xfunc = Interpolation[(data[[All, ;; 4]]), InterpolationOrder -> 1];
yfunc = Interpolation[(data[[All, {1, 2, 3, 5}]]),
InterpolationOrder -> 1];
zfunc = Interpolation[(data[[All, {1, 2, 3, 6}]]),
InterpolationOrder -> 1];
{{xmin, xmax}, {ymin, ymax}, {zmin, zmax}} =
MinMax /@ Transpose[data][[;; 3]];
VectorPlot3D[{xfunc[x, y, z], yfunc[x, y, z], zfunc[x, y, z]}, {x,
xmin, xmax}, {y, ymin, ymax}, {z, zmin, zmax}] // Quiet
'ListVectorPlot3D'可以做到这一点。如何将数据放入适当的“ListVectorPlot3D”格式取决于源数据的格式。 – Szabolcs
通过使用“ListVectorPlot3D [vecdata]”,我得到一个空立方体。所以,我从我的文件中单独导入每一列,如“x1 = import [File,{”Data,All,5}]“,然后使用”LIstVectorPlot3D [{{x1,y1,z1},{vx1,vy1, vz1}}]“并且我得到”不是有效的矢量字段数据集或数据集的有效列表“ – Mak