How can I add legend or color index to my scatter function

1 Ansicht (letzte 30 Tage)
Mithilesh Ghate
Mithilesh Ghate am 15 Nov. 2018
Beantwortet: madhan ravi am 16 Nov. 2018
[Long,Lat] = LatLong2XY(deg2rad(file(2:end,1)),deg2rad(file(2:end,2)),deg2rad(file(2,1)),deg2rad(file(2,2)),0);
scatter(Lat,Long,[],file(2:end,3));
xlabel('distance(meters)');
ylabel('distance(meters)');
dim = [.2 .5 .3 .3];
title('Signal Strength of Antenna');
str='-40==Good Signal Strength ; -90==Moderate Signal Strength';
annotation('textbox',dim,'String',str,'FitBoxToText','on');

Antworten (2)

Luna
Luna am 16 Nov. 2018
Hi
please check the legend function below:

madhan ravi
madhan ravi am 16 Nov. 2018
legend({'LAT Vs Long'});

Community Treasure Hunt

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

Start Hunting!

Translated by