how to color the world with two color(red and green)?
2 views (last 30 days)
Show older comments
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 Comments
Answers (1)
KSSV
on 28 Sep 2020
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 Comments
See Also
Categories
Find more on Blue in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!