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 CenterFile Exchange 中查找有关 2-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