Obtain intensity of each pixel in a contour plot?
3 次查看(过去 30 天)
显示 更早的评论
I have generated a contour plot with a dimension size of 101 x 102 pixels. I would like to obtain the "level" of each pixel (which I interpret as being the relative intensity of that pixel) and then reshape that into the same size plot. I know that I can click on each pixel and it will tell me the level, but I was wondering if there was a code I could use to return all intensity values for all pixels. Thanks.
0 个评论
回答(1 个)
darova
2021-3-12
You can extract each contour separately
[c,h] = contour(x,y,z);
h1 = get(h,'children');
for i = 1:length(h1)
x = get(h1(i),'xdata');
y = get(h1(i),'ydata');
line(x,y,'color',rand(1,3))
end
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Contour Plots 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!