I have ILNumerics code like this:
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. In that matrix "contoh", I have one value that different with other neighbors. I want to plot that matrix become something like this figure:
But, there is that I got:
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].
And for the last. Can anyone teach me how to make code that will generate a figure as like as Figure 1?
Both plots are different because they are of different type. The matlab one is an imagesc, the ILNumerics one is a surface. Imagesc plots will be available for ILNumerics with the next release.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.