plot3 not functioning
60 次查看(过去 30 天)
显示 更早的评论
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 个评论
回答(1 个)
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.
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Scatter Plots 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!