mv drawfire.m max_hfx.m to vis3d
[wrf-fire-matlab.git] / cycling / plot_paths3d.m
blob163c6c8dedec0e3b6111e38e984c9ee007275cf2
1 function plot_paths3d(path_struct,fig_num)
2 %input path_sruct = graph_dets(w,cull)
3 %      fig_num - figure to draw on       
4 %fg = path_struct.graph;
5 t0 = path_struct.red.start_datenum;
6 pts = path_struct.points(:,1:3);
7 pts(:,3) = pts(:,3)-t0;
8 pts(:,1:2) = path_struct.grid_pts;
9 %pts(:,3) = (pts(:,3)-floor(min(pts(:,3))));
10 paths = path_struct.paths;
11 figure(fig_num)
12 hold on
14 for j = 1:length(paths)%length(pts)
15     c = sqrt(path_struct.paths(j).c/100);
16     plot3(pts(paths(j).p,2),pts(paths(j).p,1),pts(paths(j).p,3),'g');
17     %plot3(pts(paths(j).p,2),pts(paths(j).p,1),pts(paths(j).p,3));
18 end
19 scatter3(pts(:,2),pts(:,1),pts(:,3),'*r')
20 hold off
21 grid on,xlabel('Lon'),ylabel('Lat'),zlabel('Time [days]')
22 title('Shortest Paths and Active Fire Detections')
23 end