Need help with multiple figures!
2 次查看(过去 30 天)
显示 更早的评论
Hello Matlab community !
I would like some help with my program. I want to make multiple figures with the same plots i have.I have read that i can do this with the ...figure()... or with the ..subplot...I tried them but i had no success.
The part (function) of the program with the plots is this :
function Finger_plot(F,i)
x1=F(5,i);
y1=F(6,i);
z1=F(7,i);
x2=F(8,i);
y2=F(9,i);
z2=F(10,i);
x3=F(11,i);
y3=F(12,i);
z3=F(13,i);
x=F(14,i);
y=F(15,i);
z=F(16,i);
line( [ x1 x2 x3 x], [ y1 y2 y3 y], [ z1 z2 z3 z],'Color','b','LineWidth',15.55)
hold on
plot3(x1,y1,z1,'or','LineWidth',15.55)
plot3(x2,y2,z2,'or','LineWidth',15.55)
plot3(x3,y3,z3,'or','LineWidth',15.55)
plot3(x,y,z,'ob','LineWidth',15.55)
axis equal
xlabel('x')
ylabel('y')
zlabel('z')
end
Thanks a lot in advance !
Nick K.
0 个评论
回答(1 个)
per isakson
2012-6-9
Multiple figures:
figure, plot3(x1,y1,z1,'or','LineWidth',15.55)
figure, plot3(x2,y2,z2,'or','LineWidth',15.55)
figure, plot3(x3,y3,z3,'or','LineWidth',15.55)
figure, plot3(x,y,z,'ob','LineWidth',15.55)
subplots in one figure:
subplot(2,2,1); plot3(x1,y1,z1,'or','LineWidth',15.55)
subplot(2,2,2); plot3(x2,y2,z2,'or','LineWidth',15.55)
subplot(2,2,3); plot3(x3,y3,z3,'or','LineWidth',15.55)
subplot(2,2,4); plot3(x,y,z,'ob','LineWidth',15.55)
--- More ---
Try add
line( [ x1 x2 x3 x], [ y1 y2 y3 y], [ z1 z2 z3 z] ...
, 'Color','b','LineWidth',15.55)
hold on
axis equal
xlabel('x') ylabel('y') zlabel('z')
for every diagram
3 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Subplots 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!