フィルターのクリア

Color Plot In Descending Order

2 ビュー (過去 30 日間)
Sushmitha Kudari
Sushmitha Kudari 2020 年 3 月 5 日
回答済み: Sushmitha Kudari 2020 年 3 月 5 日
I have a matrix such as [x1 y1 z1; x2 y2 z2 ... xn yn zn]. I am plotting it as follows
ptCloud = pointCloud(plot_mat);
How can I add on a color matrix (in grayscale) such that the max z value is white and lowest color value is black. So far I have tried to use a colormap but the colormap only does concentration of points and not min and max.
  1 件のコメント
Image Analyst
Image Analyst 2020 年 3 月 5 日
編集済み: Image Analyst 2020 年 3 月 5 日
Please attach plot_mat in a .mat file so people can try some things. In the meantime, try the caxis() function.

サインインしてコメントする。

回答 (1 件)

Sushmitha Kudari
Sushmitha Kudari 2020 年 3 月 5 日
canyon = load('INIT.MAT')
topo = canyon.siocanyon;
%%%%%%%%%%%%%load with Munk profile%%%%%%%%%%%%%%%%%%%%
munkProfile = load('MunkS_500Hz.shd.mat');
pressureWave = munkProfile.pressure;
pressureWave = abs(pressureWave);
squished = squeeze(pressureWave);
logged = log(squished);
[X,Y]=ndgrid(1:size(logged,1),1:size(logged,2 ));
Z = ones(size(logged));
plot_mat = [X(:) Y(:) logged(:)];
[remove, ~] = find(plot_mat(:,3) == -Inf);
plot_mat(remove,:) = [];
ptCloud = pointCloud(plot_mat);
figure
pcshow(ptCloud);
cmap = colormap(gray);
Here is what I have tried. Init file is linked here.

カテゴリ

Help Center および File ExchangeColormaps についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by