Plot data on a thematic map
1 view (last 30 days)
Show older comments
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 Comments
Answers (2)
Rob Comer
on 9 Nov 2011
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)
See Also
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!