How to fix marker size in scatterm in mapping toolbox

2 ビュー (過去 30 日間)
Poulomi Ganguli
Poulomi Ganguli 2019 年 10 月 29 日
回答済み: Subhadeep Koley 2019 年 11 月 1 日
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?

採用された回答

Subhadeep Koley
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 件)

カテゴリ

Help Center および File ExchangeGeographic Plots についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by