Obtain intensity of each pixel in a contour plot?
1 回表示 (過去 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!