how to color the world with two color(red and green)?
5 次查看(过去 30 天)
显示 更早的评论
i have the current account of every country. i want to draw a map below. the current account bigger than zero is color with green while the current account smaller than zero is colored with red. i use the world.shp to do this ,but i failed. Beside, some countries lack the data, will be color with gray。
mycode:
S = shaperead('World_Country.shp', 'UseGeoCoords',true);
maxdensity = max([S.CA]);
mindensity=min([S.CA]);
fall = flipud(autumn(numel(S)));
densityColors = makesymbolspec('Polygon', {'CA', ...
[mindensity maxdensity], 'FaceColor', fall});
geoshow(S, 'DisplayType', 'polygon', ...
'SymbolSpec', densityColors)
countries.shp file: link:https://pan.baidu.com/s/1FKVBRWr6WS4pEg18XiT_-A
pin:1111
0 个评论
回答(1 个)
KSSV
2020-9-28
Refer this link: https://in.mathworks.com/matlabcentral/answers/598378-how-to-plot-coast-and-fill-the-land-with-gray-without-m_map?s_tid=srchtitle
In the above you can specify your required color using a account as contiion.
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Blue 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!