I am working with a set of data. Lat, Lon, and Data values. Each in one column in excel (A,B,C). I want to pin each location of my lat lon on the map and use the data value which is 1X1 array to apply a density color scale. The color will vary based on the intensity of the data value. I tried Pcolor, surf,mesgrid I seem to be running the same error with my data not being 2D dimensions.
Please help.

 採用された回答

Cris LaPierre
Cris LaPierre 2021 年 2 月 12 日
編集済み: Cris LaPierre 2021 年 2 月 12 日

0 投票

If you want to use your value as the color, I recommend geoscatter.
lon = (-170:10:170);
lat = 50 * cosd(3*lon);
C = rand(1,length(lon));
geoscatter(lat,lon,[],C,'o','MarkerFaceColor','flat')
colorbar

7 件のコメント

Cris LaPierre
Cris LaPierre 2021 年 2 月 12 日
You can see the function that work with map axes here.
Cris LaPierre
Cris LaPierre 2021 年 2 月 12 日
Moving reply from @Mini Me from an Answer to a Comment
Thanks I understand. It just seems like the functions that work to set up the axes of geoshow map, does not work for the geoscatter map.
Cris LaPierre
Cris LaPierre 2021 年 2 月 12 日
Correct. If you look at the link I shared, you'll see that geoshow is on the list but geoscatter is not.
Mini Me
Mini Me 2021 年 2 月 12 日
Thanks I now see that. My goal is to have the two overlay on one map. How would you suggest I go about that?
Cris LaPierre
Cris LaPierre 2021 年 2 月 12 日
I don't fully understand what you are trying to overlay. Perhaps try saving your variables to a mat file. You can attach that to your post using the paperclip icon.
Mini Me
Mini Me 2021 年 2 月 12 日
My goal is to plot a polygon using Lat and Lon coordinate on the US map from one set of data. Now I have a different set of data that have lat and lon coordinates and data measurement values. The coordinates of the new data set fall inside of the polygon. I want to plot those coordinates with respect to the data values and see the intensity of those values inside the polygon.
Mini Me
Mini Me 2021 年 2 月 12 日
Never mind. I used geoplot..It works now

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeInteractive Control and Callbacks についてさらに検索

製品

リリース

R2019b

質問済み:

2021 年 2 月 12 日

コメント済み:

2021 年 2 月 12 日

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by