필터 지우기
필터 지우기

Need help with multiple figures!

조회 수: 1 (최근 30일)
Nikolaos
Nikolaos 2012년 6월 9일
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.

답변 (1개)

per isakson
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)
I prefer the FEX contribution, tight_subplot, to subplot
--- 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
per isakson
per isakson 2012년 6월 9일
"full item" ???
per isakson
per isakson 2012년 6월 9일
I gave you a hint, not a complete solution.

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Subplots에 대해 자세히 알아보기

제품

Community Treasure Hunt

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

Start Hunting!

Translated by