Mathematica ListcontourPlot3D [英] Mathematica ListcontourPlot3D
问题描述
我的数据格式为 { {x,y,z,f}...}
我正在使用 ListContourPlot3D
但我得到的只是一个空框每个方向的尺寸为 -1 到 1.这是我的代码:
I have data in the form { {x,y,z,f}...}
I am using ListContourPlot3D
but all I get is an empty box with dimensions -1 to 1 in each direction. Here is my code:
ListContourPlot3D[data5, PlotRange -> All,
AxesLabel -> {"[Beta]", "[Omega]", "Vo"}, Contours -> {1500}].
这些是我数据的前5分:(全集55分)
These are the first 5 points of my data:( the whole set has 55 points)
{{200, 20000 10^(1/3), 2000, 1226},
{200, 20000 10^(1/3), 2600, 1422},
{200, 20000 10^(1/3), 3200, 1581},
{200, 20000 10^(1/3), 3800, 1761},
{200, 20000 10^(1/3), 4400, 1872}}
Dimensions[data5]
返回 {55,4}
如果我执行 IntegerPart[data5]
它会正确执行,因此它必须识别我的数据中的数字.
Dimensions[data5]
returns {55,4}
If I do IntegerPart[data5]
it does it correctly so it must recognize the numbers in my data.
我很欣赏任何想法.谢谢.
I appreciate any ideas. Thank you.
推荐答案
问题是在低分辨率下使用 ListContourPlot3D
的 {x,y,z,f} 形式.几周前我也偶然发现了这个问题,这是该错误的一个最小示例:
The problem is using the {x,y,z,f} form of ListContourPlot3D
at low resolution.
I stumbled over this a few weeks ago as well, here is a minimal example of the bug:
xyzfdata[r_] := Flatten[#, 2] &@Table[{x, y, z, x^2 + y^2 + z^2 - 1},
{x, -2, 2, r}, {y, -2, 2, r}, {z, -2, 2, r}];
(* Low resolution {x,y,z,f} fails *)
ListContourPlot3D[xyzfdata[1], Contours -> {0}]
在我的情况下(我在网格上有我的数据)的解决方案是使用网格表单和 DataRange
:
The solution in my case (I had my data on a grid) was to use the grid form and DataRange
:
fdata[r_] := Table[x^2 + y^2 + z^2 - 1,
{z, -2, 2, r}, {y, -2, 2, r}, {x, -2, 2, r}];
(* Low resolution works ok for array data *)
ListContourPlot3D[fdata[1], Contours -> {0},
DataRange -> 2 {{-1, 1}, {-1, 1}, {-1, 1}}]
我认为问题是对于 {x,y,z,f} 形式,实现使用插值的方式在低分辨率下失败.在第一个示例中提高分辨率,一切正常:
I think the issue is that for the {x,y,z,f} form, the implementation uses interpolation in a way that fails at low resolution. Upping the resolution in the first example, everything works:
(* Higher resolution {x,y,z,f} works *)
ListContourPlot3D[xyzfdata[.2], Contours -> {0}]
这篇关于Mathematica ListcontourPlot3D的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!