필터 지우기
필터 지우기

How do I draw contours on multiple surfaces so that they line up

조회 수: 13 (최근 30일)
Rowan
Rowan 2024년 7월 17일 15:59
댓글: Voss 2024년 7월 18일 13:07
I have a 3D plot of a 7 2D curves with 6 surfaces drawn so that tthey connect them. Im looking to draw contours on this figure but the only useful comand I can find is
>> contour3([k1;k2], [x1;x2], [z1;z2], 25, 'color', 'k', 'linewidth', 0.1)
where x1 and z1 are the data for my first curve and k1 is used to determine its position in 3D by fixing it. The problem im having is that the command is drawing 25 contours evenly spaced from the maximum value and minimum value out of z1 and z2 causing it to missmatch with 3rd set of contours as z2 has a much greater maximum value compared to z3 and z4. How can i go about creating contours that wont have this problem? The plot with out contours and a plot with contours along with it rotated can be seen below. Hopefully the images illustrates the problem with mismatching contours. Many thanks in advance.

채택된 답변

Voss
Voss 2024년 7월 17일 16:06
Maybe specifying a vector of contour levels, rather than the number of levels, is appropriate. For example:
lev = 0.01:0.01:0.08;
contour3([k1;k2], [x1;x2], [z1;z2], lev, 'color', 'k', 'linewidth', 0.1)

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Contour Plots에 대해 자세히 알아보기

제품


릴리스

R2023b

Community Treasure Hunt

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

Start Hunting!

Translated by