How to get a 3D image from 2D countourf?

2 ビュー (過去 30 日間)
Jorge Pascual
Jorge Pascual 2020 年 1 月 17 日
回答済み: Star Strider 2020 年 1 月 17 日
Hi everyone!
I have an easy question. I have the attached variable, and I usually reprent it as a 2D figure with the next code:
>> [X, h] = contourf(Pedobarography,'LevelList',[0.1:20000:150000]);
colormap('parula');
colorbar;
set(gca, 'YDir','reverse')
Now I want to show it as a 3D figure, I have tried with 'surf (Pedobarography)', but obtained figure is black
Any solution?
Thanks in advanced!

採用された回答

Star Strider
Star Strider 2020 年 1 月 17 日
Black surf plots are common with very densely-gridded data.
To avoid that, set 'EdgeColor' to 'none':
D = load('Pedobarography.mat');
PB = D.Pedobarography;
figure
surf(PB, 'EdgeColor','none')
colormap('parula');
colorbar;
set(gca, 'YDir','reverse')
grid on
producing:

その他の回答 (0 件)

カテゴリ

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

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by