Question about PLOTTING over MAPS
古いコメントを表示
I am using a code to generate the maps, but I'm still having a little trouble adding my own data. What I need is very simple, I have a data file with latitude, longitudes and the number of times that lightning struck on that location (Basically I need a density plot). Any comments will be very helpful.
Thank you, Diana
2 件のコメント
Doug Hull
2012 年 7 月 17 日
Do you need this to be on a map projection, or treating the world as flat is fine because lat and lon are really just X and Y to you?
Are you using the mapping toolbox?
do you know how to convert this to density, regardless of it being lat and lon?
Diana
2012 年 7 月 17 日
回答 (1 件)
Walter Roberson
2012 年 7 月 17 日
pointsize = 8;
scatter(lat(:), long(:), pointsize, numstrikes(:))
colorbar
12 件のコメント
Diana
2012 年 7 月 17 日
Diana
2012 年 7 月 17 日
Diana
2012 年 7 月 17 日
Walter Roberson
2012 年 7 月 17 日
Do you have a "hold on" command? You should.
Also if I recall correctly, there is a scatterm() in the mapping toolbox that can be used with map projection. You would still need "hold on" between the two plots.
Diana
2012 年 7 月 17 日
Walter Roberson
2012 年 7 月 17 日
編集済み: Walter Roberson
2012 年 7 月 17 日
scatterm() does exist http://www.mathworks.com/help/toolbox/map/ref/scatterm.html . But possibly not in your version. Which version are you using?
I am not familiar with how the mapping toolbox draws the maps. Which drawing command are you using? I'm thinking that if that command is creating its own axes then one of the two axes would be on top, hiding the other one. A quick test for that would be to draw the scatter plot second, then set(gca, 'Color', 'none')
Diana
2012 年 7 月 17 日
Diana
2012 年 7 月 17 日
Walter Roberson
2012 年 7 月 17 日
The Mapping Toolbox is an optional add-on product for the Student Version (just as it is for the other versions). It has the same functionality in the student version as in the professional version. See http://www.mathworks.com/academia/student_version/companion.html
If that is not what you are using, please indicate where you found the mapping software you are using.
Diana
2012 年 7 月 17 日
Walter Roberson
2012 年 7 月 17 日
That package is a bit big for me to "sight read", and unfortunately I do not have access to MATLAB for the next bit of time (waiting for a new computer to arrive...)
I don't think I will be able to assist with that toolbox within a reasonable time.
Diana
2012 年 7 月 17 日
カテゴリ
ヘルプ センター および File Exchange で Interact with Maps についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!