📄 plot_route.m
字号:
function plot_route(node_coord, route_path, color, draw_text)%visualize the routing path draw_text = 1;if size(node_coord,2)~=2 error('wrong format in node_coord');endn = size(node_coord,1);hold onfrom = route_path(1);for i = 2:length(route_path) to = route_path(i); plot([node_coord(from,1) node_coord(to,1)], [node_coord(from,2), ... node_coord(to,2)],color); if draw_text idstr = sprintf('%d',from); text(node_coord(from,1),node_coord(from,2),idstr); end from = to;endif draw_text idstr = sprintf('%d',from); text(node_coord(from,1),node_coord(from,2),idstr);end
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -