필터 지우기
필터 지우기

How to plot projections of plot3(X,Y,Z) on same 3D graph

조회 수: 27 (최근 30일)
Dimitar
Dimitar 2014년 2월 11일
댓글: Qun Wu 2017년 5월 23일
How can I plot on same 3D graph of plot3, the projections on XY and so on.
X Y Z are vectors similar to the matlab example http://www.mathworks.com/help/matlab/ref/plot3.html .
I would like the projections to be on the walls xy xz .. planes like shadows. Similar to what contour plot is doing for 3D surface plots.

답변 (1개)

Walter Roberson
Walter Roberson 2014년 2월 11일
Depending on how your X and Y are structured, you may wish to consider using meshc
Are the points in a rectangular grid or are they scattered?
  댓글 수: 2
Walter Roberson
Walter Roberson 2014년 2월 11일
편집: Walter Roberson 2014년 2월 11일
I see that you adjusted the question to indicate the the inputs are vectors, presumably not happening to fall into a nice grid.
In such a case:
subplot(1,3,1);
plot3(X, Y, 0*Z); %projection from Z+
subplot(1,3,2);
plot3(X, 0*Y, Z); %projection from Y-
subplot(1,3,3);
plot3(0*X, Y, Z); %projection from X+
I might have the "Y-" wrong.
Qun Wu
Qun Wu 2017년 5월 23일
Someone owns you a 'Thank you', I guess.

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 2-D and 3-D Plots에 대해 자세히 알아보기

태그

제품

Community Treasure Hunt

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

Start Hunting!

Translated by