简体   繁体   English

为什么在ILNumerics中绘制数据会产生不对称的结果? (二维图)

[英]Why ploting data in ILNumerics produce the result that is not symmetry? (2D Plot)

I have ILNumerics code like this: 我有这样的ILNumerics代码:

        var scene = new ILScene();

        ILColormap cm = new ILColormap(Colormaps.Hot);
        ILArray<float> data = cm.Data;

        data[":;0"] = ILMath.pow(data[":;0"], 3.0f);
        cm.Data = data;

        ILArray<float> contoh = ILMath.zeros<float>(15, 15);
        contoh[7, 14] = 1;

        scene.Add(
            new ILPlotCube(twoDMode: false){
                new ILSurface(contoh){
                    Wireframe = { Color = Color.FromArgb(50, Color.LightGray)},
                    Colormap = new ILColormap(data),
                    Children = { new ILColorbar()}
                }

            }
        );

        ilPanel1.Scene = scene;

Roughly speak, I want to plot 2D model. 粗略地说,我想绘制2D模型。 In that matrix "contoh", I have one value that different with other neighbors. 在那个矩阵“ contoh”中,我有一个与其他邻居不同的值。 I want to plot that matrix become something like this figure: 我想将该矩阵绘制成如下图所示:

图1

But, there is that I got: 但是,我得到了: 图2

If we see the white area, it is not symmetry. 如果我们看到白色区域,则它不是对称的。 Why this is happen? 为什么会这样呢? When I slightly rotate the model, we can see more clearly that even I have data in [14,7] position, the white area stretching until [13,6] but not to [13,8]. 当我稍微旋转模型时,我们可以更清楚地看到,即使我的数据处于[14,7]位置,白色区域也可以拉伸到[13,6],但不能拉伸到[13,8]。

在此处输入图片说明

And for the last. 最后。 Can anyone teach me how to make code that will generate a figure as like as Figure 1? 谁能教我如何制作将生成如图1所示的图形的代码?

Both plots are different because they are of different type. 两种情节是不同的,因为它们是不同的类型。 The matlab one is an imagesc, the ILNumerics one is a surface. matlab一个是图像,ILNumerics一个是表面。 Imagesc plots will be available for ILNumerics with the next release. 在下一个版本中,Imagec图将可用于ILNumerics。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM