Plotting with plot3 and patch
조회 수: 4 (최근 30일)
이전 댓글 표시
I have a script which is plotting some 3d objects made with patch. I would also like to plot the trajectory of one of the objects. I am using plot3 to do this. However, I cannot find a way to plot both on the same figure despite hold on already being used. Any thoughts?
댓글 수: 2
Nico Dieckmann
2023년 1월 27일
Hello,
i have the same problem. The Code i use is from you KSSV. It works very well. But i want to plot some additional points in the same figure using the plot3 function. Unfortunately this does not work. What am i doing wrong?
Code:
figure
cellfun(@patch,repmat({'Vertices'},1,nel),XYZ,.......
repmat({'Faces'},1,nel),repmat({fm},1,nel),......
repmat({'FaceVertexCdata'},1,nel),profile,......
repmat({'FaceColor'},1,nel),repmat({'interp'},1,nel));
view(3)
set(gca,'XTick',[]) ; set(gca,'YTick',[]); set(gca,'ZTick',[]) ;
axis on;
SetColorbar
hold on
plot3(PointCoordinate(:,1),PointCoordinate(:,2),PointCoordinate(:,3),'.','Color','red','MarkerSize',10);
Hopefully, you can help me.
Best Regards
답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Polygons에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!