plot3 not functioning
10 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
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;

0 Kommentare
Antworten (1)
Walter Roberson
am 10 Jul. 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 Kommentar
Siehe auch
Kategorien
Mehr zu Scatter Plots finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!