change mouse hover datatip information?
15 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
Sven Larsen
il 3 Mar 2024
Commentato: Sven Larsen
il 3 Mar 2024
I have created geoscatter of vehicle speed. When hovering over datapoints on map, datatips show Latitude and Longlitude. How can I change this to show speed?
my code is:
geoscatter(GPSData.latitude, GPSData.longitude, 100, GPSData.speed,'filled');
colormap jet
caxis([0 120]);
0 Commenti
Risposta accettata
Anton Kogios
il 3 Mar 2024
Since I don't have your GPSData data, here's a working example of how to do it using dataTipTextRow. See also Create Custom Data Tips and DataTipTemplate Properties.
lat = [32.30 33.92 35.17 36.98 37.69 38.34];
lon = [-91.05 -91.18 -90.09 -89.11 -89.52 -90.37];
A = 100*[5 12 15 3 10 3];
C = [1 2 2 3 1 1];
g = geoscatter(lat,lon,A,C,"filled");
g.DataTipTemplate.DataTipRows = dataTipTextRow('Speed',C,'auto');
Otherwise you can also edit individual data tips using:
g.DataTipTemplate.DataTipRows(1).Label = 'Speed';
g.DataTipTemplate.DataTipRows(1).Value = 'SizeData';
g.DataTipTemplate.DataTipRows(1).Format = 'auto';
Più risposte (0)
Vedere anche
Categorie
Scopri di più su Data Distribution Plots in Help Center e File Exchange
Prodotti
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!