plot3 not functioning

10 visualizzazioni (ultimi 30 giorni)
Ashraf Rafiza
Ashraf Rafiza il 10 Lug 2020
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;

Risposte (1)

Walter Roberson
Walter Roberson il 10 Lug 2020
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 Commento
Konstantin Ninidze
Konstantin Ninidze il 3 Apr 2021
Thank you so much. Really appreciate it!

Accedi per commentare.

Prodotti


Release

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by