필터 지우기
필터 지우기

plot3 for three dimension data

조회 수: 1 (최근 30일)
fred bnm
fred bnm 2018년 12월 13일
답변: Star Strider 2018년 12월 13일
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');

채택된 답변

Star Strider
Star Strider 2018년 12월 13일
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)

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Graphics Object Identification에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by