How can I add another label with plotPosition in Automated Driving tool box?
2 次查看(过去 30 天)
显示 更早的评论
Hi seniors,
I'm trying to use plotPosition in Automated Driving tool box to plot a few coordinates. I have successfully plotted these points with relevant labels besides them as depicted in the figure but I want to plot another vector of labels associated with each point and intend to put these labels any position not overlapping the current ones. Please could anyone instruct me to solve this? Any suggestions are appreciated!
0 个评论
回答(1 个)
Pranjal Kaura
2021-11-24
Hey Qiao,
It is my understanding that you want to add more than 1 label to the points plotted using 'plotPosition'. You can use the 'text' function to add textual description to data points. You can set the 'geoplayer' object axes as the axes to plot on and pass lattitude and longitude values of the points followed by the text/label you want to add.
You can refer the following code snippet:
data = load('geoRoute.mat');
player = geoplayer(data.latitude(1),data.longitude(1),12);
plotRoute(player,data.latitude,data.longitude);
plotPosition(player,data.latitude(1),data.longitude(1));
text(player.Axes, data.latitude(1),data.longitude(1), "LABEL", 'Color','red','FontSize',7);
Hope this helps!
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Financial Toolbox 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!