필터 지우기
필터 지우기

Matlab surface isolines

조회 수: 8 (최근 30일)
Chris
Chris 2011년 7월 20일
Hi, I have a triangular surface that I'm plotting using the trimesh() function. Each node of my mesh has a value that I am representing using the figure colorscale. What I would like to do is add "isolines" to the surface so you can get a better since of the data. However, when I try using plot3() to plot these lines on top of the surface, most of them are not visible. Does anyone know how I can plot visible lines on top of a surface in matlab?

답변 (1개)

Sean de Wolski
Sean de Wolski 2011년 7월 20일
EDIT per comments:
Of course; set the facealpha property of the mesh to a small number (1 is opaque, 0 is transparent). This will allow your line to be visible:
[x,y]=meshgrid(1:15,1:15); %ml example from doc
tri = delaunay(x,y);
z = peaks(15);
trimesh(tri,x,y,z,'facealpha',0.2)
hold on
plot3([1 30],[1 30],[0 pi])
  댓글 수: 1
Chris
Chris 2011년 7월 20일
Unfortunately, using line() instead of plot3() gives the same behavior. If I create a small pyramid using trimesh() and test either of these commands with a sample line, the line ends up being visible only where it does not overlap with one of the triangle faces.

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

카테고리

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