Plotting with plot3 and patch

4 ビュー (過去 30 日間)
Cameron Crook
Cameron Crook 2016 年 12 月 8 日
コメント済み: Nico Dieckmann 2023 年 1 月 27 日
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 件のコメント
KSSV
KSSV 2016 年 12 月 8 日
It has to work...why don't you post you code here?
Nico Dieckmann
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 ExchangePolygons についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by