How can I add another label with plotPosition in Automated Driving tool box?

2 ビュー (過去 30 日間)
QIAO WANG
QIAO WANG 2021 年 11 月 13 日
回答済み: Pranjal Kaura 2021 年 11 月 24 日
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!

回答 (1 件)

Pranjal Kaura
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!

カテゴリ

Help Center および File ExchangeFinancial Toolbox についてさらに検索

製品


リリース

R2020a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by