连接线与什么?

时间:2016-05-17 19:12:51

标签: matlab plot

如何连接多个图?

我有这样的情节

enter image description here

每种颜色代表不同的plot3 可以在每个plot3图之间画一条线或虚线吗?只是为了想象它们是否已连接?

代码:

figure
point = [0 0 0 ];
hold on
mpdc10 = distinguishable_colors(9);
plot3(position_world_ball(:,1),position_world_ball(:,2),position_world_ball(:,3),'.','MarkerSize',10,'Color',mpdc10(1,:))
hold on
% endeffector pathposition_world
%for i = 1:1:length(position_base_joint1)
%    display(i)
%plot3(position_world_base(:,1),position_world_base(:,2),position_world_base(:,3),'.','Color',mpdc10(2,:))
hold on
%plot3(position_base_joint1(:,1),position_base_joint1(:,2),position_base_joint1(:,3),'.', 'Color',mpdc10(3,:))
hold on
%plot3(position_joint1_joint2(:,1),position_joint1_joint2(:,2),position_joint1_joint2(:,3),'.' ,'Color',mpdc10(4,:))
hold on
%plot3(position_joint2_joint3(:,1),position_joint2_joint3(:,2),position_joint2_joint3(:,3),'.' ,'Color',mpdc10(5,:))
hold on
%plot3(position_joint3_joint4(:,1),position_joint3_joint4(:,2),position_joint3_joint4(:,3),'.' ,'Color',mpdc10(6,:))
hold on
plot3(position_joint4_joint5(:,1),position_joint4_joint5(:,2),position_joint4_joint5(:,3),'.' ,'Color',mpdc10(7,:))
hold on
plot3(position_joint5_joint6(:,1),position_joint5_joint6(:,2),position_joint5_joint6(:,3),'.' ,'Color',mpdc10(8,:))
hold on
plot3(position_joint6_toolFrame(:,1),position_joint6_toolFrame(:,2),position_joint6_toolFrame(:,3),'.','Color',mpdc10(9,:))
% %end
hold on
legend('ball','world-base', 'world-joint1','world-joint2','world-joint3','world-joint4', 'world-joint5','world-joint6')      
hold on
xlabel('x')
hold on
ylabel('y')
hold on
zlabel('z')
hold on
axis tight
hold on

0 个答案:

没有答案