Mathematica 列表轮廓图3D
我的数据格式为 { {x,y,z,f}...}
我正在使用 ListContourPlot3D
但我得到的只是一个尺寸为 -1 的空框每个方向都为 1。这是我的代码:
ListContourPlot3D[data5, PlotRange -> All,
AxesLabel -> {"[Beta]", "[Omega]", "Vo"}, Contours -> {1500}].
这些是我的数据的前 5 个点:(整个集合有 55 个点)
{{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] ,它会正确执行,因此它必须识别我的数据中的数字。
我很欣赏任何想法。 谢谢。
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}].
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]
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.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
如果没有整个数据集,很难判断,但我敢打赌你的轮廓有问题 -> {1500} 设置。如果完全省略它或使用不同的值会发生什么?
It's hard to tell without having the entire dataset, but I am betting there is a problem with your Contours -> {1500} setting. What happens if you omit it altogether or use a different value?
轮廓 ->编号
绘制 num 个等距的水平轮廓。
轮廓 -> {编号}
绘制 f[x,y,z] = num 轮廓。
你指的是前者吗?如果数据太稀疏或本地化,我怀疑 ListContourPlot3D 能否绘制数据。对于您提供给我们的数据样本,x 和 y 根本没有变化。最终数据集中的 x 和 y 变化是否足以很好地填充坐标空间?
Contours -> num
Plots num equally spaced levels contours.
Contours -> {num}
Plots the f[x,y,z] = num contour.
Did you mean the former? I doubt ListContourPlot3D can plot your data if it is too sparse or to localized. For the data sample you gave us x and y do not vary at all. Does x and y vary enough in you final data set to well populate coordinate space?
@Davorak's 建议数据集,如所写,似乎没有变化可能是原因的问题。假设情况并非如此,请尝试旋转生成的图形,如果您看到出现黑色平面,则说明配色方案已关闭。默认情况下,
ListContourPlot3D
会生成不透明的白色表面,但我遇到过这样的问题:它似乎没有生成任何东西,但它只是不可见。解决方案:添加一个ContourStyle
选项,并将其设置为Red
之类的内容。@Davorak's suggestion that the data set, as written, does not seem to vary may be the cause of the problem. Assuming that is not the case, try rotating the resulting graphic, and if you see a black plane appear, then it is the color scheme that is off. By default,
ListContourPlot3D
produces an opaque white surface, and I've had issues where it did not seem to produce anything, but it was just invisible. The solution: add aContourStyle
option, and set it to something likeRed
.问题在于以低分辨率使用
ListContourPlot3D
的 {x,y,z,f} 形式。几周前我也偶然发现了这个问题,这是该错误的一个最小示例:
我的案例(我的数据位于网格上)的解决方案是使用网格表单和 DataRange:
我认为问题在于,对于 {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:
The solution in my case (I had my data on a grid) was to use the grid form and
DataRange
: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: