How to fix marker size in scatterm in mapping toolbox
1 回表示 (過去 30 日間)
古いコメントを表示
Hello:
I want to show circles on the map using scatterm function. In that I want to fix size of each circles proportional to the magnitude. For example, magnitude corresponds to 100% or larger should appear as bigger circles and 50% will have the size the half of the previous case. They should also appear in the legend symbol. How should I fix the scales?
0 件のコメント
採用された回答
Subhadeep Koley
2019 年 11 月 1 日
Hi, according to the documentation, in scatterm(lat,lon,s,c) the area of each marker is determined by the magnitudes in the vector s.
Still if you are not able to use different size markers then use the code below, which travers through the vector sand plots different sizes of the marker based upon the given condition.
load seamount;
worldmap([-49 -47.5],[-150 -147.5])
for i=1:size(x,1)
if z(i)> (-850) % put your magnitude condition here
scatterm(y(i),x(i),5,z(i),'o','filled') % here markersize is 5
else
scatterm(y(i),x(i),50,z(i),'o','filled') % here markersize is 50
end
end
Hope this helps!
0 件のコメント
その他の回答 (0 件)
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!