Plotting with plot3 and patch
3 次查看(过去 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!