Borrar filtros
Borrar filtros

plot3 for three dimension data

1 visualización (últimos 30 días)
fred bnm
fred bnm el 13 de Dic. de 2018
Respondida: Star Strider el 13 de Dic. de 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');

Respuesta aceptada

Star Strider
Star Strider el 13 de Dic. de 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)

Más respuestas (0)

Categorías

Más información sobre Graphics Object Identification en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by