필터 지우기
필터 지우기

3-d plotting surface and contour

조회 수: 2 (최근 30일)
Sean Smith
Sean Smith 2011년 9월 30일
I am trying to plot a figure (a ships hull). I want to plot a surface plot and a contour plot but I want the contour plot on the bottom of the Z axis. So if the z axis runs from 0 up to 2 the hull goes from 2 down to 1. Then i want a gap and the contour plot on 0 so its at the bottom of the graph not at the bottom of the figure. I tried using surfc and surf and contour but I can't figure out how to move the contour graph down the Z axis so it is separate of the hull. I hope that makes sense. Thanks.
  댓글 수: 1
Sean Smith
Sean Smith 2011년 9월 30일
it puts the contour graph at z=0 which is the top of the graph (the top of the hull) I need it at the other end of the z-axis. I made those numbers up, sorry for the confusion. My Z axis is decreasing, so 0 is at the top and -2 is at the bottom. I need the contour plot at -2 which would be all the way under the hull, not at 0 which is on top of the hull.

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

답변 (2개)

Fangjun Jiang
Fangjun Jiang 2011년 9월 30일
Will this example help?
A=peaks;
surf(A+10);
hold on;
contour(A);
grid on;

Walter Roberson
Walter Roberson 2011년 9월 30일
You should not require anything more than "hold on". contour() outputs patch objects that, in effect, have Z of 0.

카테고리

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