How getting coordinates of geagraphical locations?
이전 댓글 표시
Hi,
I have the following struct array.
data=struct('Position',[],'Value',[])
data(1).Position='London';
data(1).Value=20;
data(2).Position='Rome';
data(2).Value=100;
What I need is a bubble plot of values field with a map in the background and the bubble must be located where is the geographical location. I know this function http://www.mathworks.com/matlabcentral/fileexchange/27627-plot-google-map but I don't know how to get the coordinates of the locations. Does anyone have an idea?
Thanks
Cheers
Pietro
채택된 답변
추가 답변 (2개)
Chad Greene
2014년 10월 7일
1 개 추천
Do you have the mapping toolbox? If so, the inputm function lets you click on a map to get geographic coordinates.
As a matter of style, I strongly recommend against ever using bubble plots. Circles are two dimensional, but your variable, let's call it population, is one dimensional. As Edward Tufte points out, you should never let the dimensions of the display exceed the dimensions of the data. This is particularly important in the case of circles, because our eyes do not scale the size of circles linearly.
A question I always have when I see bubble plots: is the radius of the circle scaling with the data, or is the area of the circle scaling with the data? That is rarely clear. Even if you are explicit about which scaling you use, the way we perceive the size of a circle is not linear with radius or area.
Inevitably, if you place a giant circle over London to show its big population, some of that circle will overlap outlying towns that are not represented by that circle, and that just does not make any sense at all. It would be more insightful to plot population density with a color map or even contours. That way you'd preserve the nuance of the original data instead of distilling everything down and saying to your viewer, "look, this circle is bigger than this other circle". Just a personal preference, but I say leave bubble plots to the click bait sites.
댓글 수: 7
pietro
2014년 10월 7일
Chad Greene
2014년 10월 7일
See Geoff's solution. It's pretty darn cool.
pietro
2014년 10월 8일
Chad Greene
2014년 10월 8일
Ah, if all the circles are the same size that's fine. I thought you'd be scaling the size of the circles relative to some variable. No color map or heat map necessary. :)
pietro
2019년 1월 10일
Sébastien MAILFERT
2019년 1월 22일
Hi pietro,
it is clear that there is a huge problem if the website does not exist anymore.
Did you find a solution?
pietro
2019년 1월 22일
Sébastien MAILFERT
2019년 1월 21일
0 개 추천
Hi all,
the query.yahooapis.com site does not work anymore since few days.
Do you have an idea to bypass this yahoo queries?
Best regards.

댓글 수: 2
Serbring
2019년 11월 18일
that is good resource. You can access to website to the API. I am not an expert on this.
카테고리
도움말 센터 및 File Exchange에서 Geographic Plots에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!