Plot data on a thematic map
1 回表示 (過去 30 日間)
古いコメントを表示
Hi everyone,
I'm quite a newbie to Matlab and I was wondering if you could help me with a certain issue I'm having.
To simplify, I've got a vector (550 X 1 double) that I'd like to plot at a map. Each data should represent a certain attribute of a specific city. The map should be colored (AUTUMN style for example).
I also have a vector (550 X 1) with the codes and the Shape-file wich has the same code for each city.
Now, to be honest, I'm 100% stuck. When I go to mapview and open the shape-file I do see the map but without anydata and singlecolored, I'm not going any further than that. What should be the next steps to see my data in that map?
Thanks a lot in advance!
0 件のコメント
回答 (2 件)
Rob Comer
2011 年 11 月 9 日
You need to use makesymbolspec. Here's a simple example that constructs and applies a symbol spec for a numerical attribute of a point data set. This example uses geoshow, but you can also use a symbol spec with mapview. First, call makesymbolspec from the command line to add a symbol spec to your workspace. Then, in the "Layers" menu, select your layer (e.g., cities), and select "Set Symbol Spec ..." in the context menu that opens to the right.
tsunamis = shaperead('tsunamis.shp','UseGeoCoords',true);
symspec = makesymbolspec('Point', ...
{'Eq_Mag',[4.5 9.5],'MarkerEdgeColor',autumn(1024)});
worldmap world
load coast
geoshow(lat,long)
geoshow(tsunamis,'SymbolSpec',symspec)
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!