필터 지우기
필터 지우기

How to change a plot form 2D to 3D

조회 수: 8 (최근 30일)
Auryn_
Auryn_ 2017년 12월 28일
답변: Walter Roberson 2017년 12월 28일
Hello, I have a plot that I did using the function "pcolor", that is pcolor(X,Y,C). Now I would like to plot the same data in 3D, using "surf". The problem is that I do not have the source data anymore. I just have the .fig file. Is it possible to plot it in 3D directly from my 2D figure? Thank you very much in advance. Best regards, Araceli

답변 (1개)

Walter Roberson
Walter Roberson 2017년 12월 28일
Open the fig file. If there are multiple plot axes then click on the one that has the pcolor display (if there is only one plot axes you should be able to skip that.) Now at the command line,
view(3)
and you should see the surface.
pcolor is really just calls to surface() followed by a call to view() and turning the axes box on, so all you have to do to see it in 3d is change the view.

카테고리

Help CenterFile Exchange에서 Surface and Mesh Plots에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by