change mouse hover datatip information?
15 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Sven Larsen
am 3 Mär. 2024
Kommentiert: Sven Larsen
am 3 Mär. 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 Kommentare
Akzeptierte Antwort
Anton Kogios
am 3 Mär. 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';
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Data Distribution Plots finden Sie in Help Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!