plot3 not functioning

조회 수: 10 (최근 30일)
Ashraf Rafiza
Ashraf Rafiza 2020년 7월 10일
편집: Walter Roberson 2021년 4월 3일
Hello ! I have a data on the number of aircraft and delay duration in each hour in a month of January. In order to see the relationship between the number of aircraft and delay duration in each hour, I want to create a 3D plot but after writing the command, the Matlab just plot it in 2D only. Can anyone help me? Thanks in advance.
The command are as below;
Y = readtable('WMKJDelayTot.xlsx')
Day = Y.Day;
Hour = Y.Time;
Delay = Y.Delay
NumAircraft = Y.NumAircraft;
DataTableWMKJ = table(Day,Hour,NumAircraft,Delay,More_Than_10_Hour,More_Than_5_Hour,More_Than_1_Hour,Below_60mins,Below_30mins,Below_15mins,OnTime);
figure
v = DataTableWMKJ.Day;
d = DataTableWMKJ.Hour;
r = DataTableWMKJ.NumAircraft;
hold on
plot3(v,d,r)
hold off
Then, the plot;
The data;

답변 (1개)

Walter Roberson
Walter Roberson 2020년 7월 10일
When you "hold on" the view() is one of the things that is held. You are using hold on before you do any 3d plotting so the 2d view is the one held.
view(3)
to get the right view.
  댓글 수: 1
Konstantin Ninidze
Konstantin Ninidze 2021년 4월 3일
Thank you so much. Really appreciate it!

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

카테고리

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

제품


릴리스

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by