![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/262285/image.png)
How to get a 3D image from 2D countourf?
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
Jorge Pascual
am 17 Jan. 2020
Beantwortet: Star Strider
am 17 Jan. 2020
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!
0 Kommentare
Akzeptierte Antwort
Star Strider
am 17 Jan. 2020
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:
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/262285/image.png)
0 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Colorbar finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!