How to get rid of this line that connects the last and first point, I have made it white so its barely visible, but is there a way to not plot it?

1 回表示 (過去 30 日間)
WayPTS = [5,4,1;
7,5,1;
7,7,1;
9,6,1;
10,8,1];
plot3 (WayPTS(:,1), WayPTS(:,2), WayPTS(:,3),'black',...
[WayPTS(end,1) WayPTS(1,1)],[WayPTS(end,2) WayPTS(1,2)],[WayPTS(end,3) WayPTS(1,3)],'white')

回答 (1 件)

Matt J
Matt J 2021 年 10 月 24 日
plot3 (WayPTS(:,1), WayPTS(:,2), WayPTS(:,3),'black');
  1 件のコメント
Image Analyst
Image Analyst 2021 年 10 月 24 日
You could also try increasing the 'LineWidth' to 2 or more to make it appear even smoother and more solid :
plot3 (WayPTS(:,1), WayPTS(:,2), WayPTS(:,3),'black', 'LineWidth', 2);
grid on;
xlabel('x', 'FontSize', 18);
ylabel('y', 'FontSize', 18);
zlabel('z', 'FontSize', 18);

サインインしてコメントする。

カテゴリ

Help Center および File Exchange2-D and 3-D Plots についてさらに検索

製品


リリース

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by