How can I add another label with plotPosition in Automated Driving tool box?
3 views (last 30 days)
Show older comments
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 Comments
Answers (1)
Pranjal Kaura
on 24 Nov 2021
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 Comments
See Also
Categories
Find more on Financial Toolbox in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!