Effacer les filtres
Effacer les filtres

Need help with multiple figures!

1 vue (au cours des 30 derniers jours)
Nikolaos
Nikolaos le 9 Juin 2012
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.

Réponses (1)

per isakson
per isakson le 9 Juin 2012
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 commentaires
per isakson
per isakson le 9 Juin 2012
"full item" ???
per isakson
per isakson le 9 Juin 2012
I gave you a hint, not a complete solution.

Connectez-vous pour commenter.

Produits

Community Treasure Hunt

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

Start Hunting!

Translated by