Filter löschen
Filter löschen

plot3 for three dimension data

1 Ansicht (letzte 30 Tage)
fred bnm
fred bnm am 13 Dez. 2018
Beantwortet: Star Strider am 13 Dez. 2018
i want using plot3 for display three dimension data. size of data is (400*3) that contain two class. size of class A is 300 and size of class B is 100.
but after run this code z axis is not showing.
please guide me.
Fspace = rand(400,3);
figure;hold on;
plot3(Fspace(1:300,1),Fspace(1:300,2),Fspace(1:300,3),'b*');
plot3(Fspace(301:400,1),Fspace(301:400,2),Fspace(301:400,3),'ro');
legend('Class A','Class B');
% axis equal;
xlabel('x');
ylabel('y');
zlabel('z');
title('original data');

Akzeptierte Antwort

Star Strider
Star Strider am 13 Dez. 2018
I can’t determine why it’s not automatically displaying.
Use the view (link) function to make it magically appear:
Fspace = rand(400,3);
figure
hold on;
plot3(Fspace(1:300,1),Fspace(1:300,2),Fspace(1:300,3),'b*');
plot3(Fspace(301:400,1),Fspace(301:400,2),Fspace(301:400,3),'ro');
hold off
legend('Class A','Class B');
% axis equal;
xlabel('x');
ylabel('y');
zlabel('z');
title('original data');
grid on
view(-30, 45)

Weitere Antworten (0)

Kategorien

Mehr zu Graphics Object Identification finden Sie in Help Center und File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by