how do drape a two dimensional array over a map?

2 ビュー (過去 30 日間)
Keihan
Keihan 2016 年 6 月 27 日
コメント済み: Chad Greene 2016 年 6 月 28 日
I'm trying to display a 2-D matrix over a map. When I use surfm Matlab function to plot the data over a map, I no longer can see the borders. Is there a way to see the borders after the data is plotted?
Here's the Matlab script I used:
%Map limits
longMin = 1;
longMax = 50;
latMin = 50;
latMax = 90;
latlim = [latMin latMax];
lonlim = [longMin longMax];
EIRP(1:90,1:50) = ones(90,50)*50;
%plot axes
figure;
axesm('mapprojection','miller','maplatlimit',[latMin latMax],...
'maplonlimit',[longMin-5 longMax+5],'grid','on','MeridianLabel','on',...
'ParallelLabel','on','PLineLocation',4,'MlineLocation',8,'LabelUnits','degrees','MLabelLocation',8,...
'LabelFormat','compass','FLatLimit',[40 86]);
geoshow('landareas.shp', 'FaceColor', [0.15 0.5 0.15])
geoshow('worldlakes.shp', 'FaceColor', 'cyan')
surfm(lat,long,EIRP(50:90,1:50))
title('EIRP')
xlabel('Longitude')
ylabel('Latitude')
Attached is a plot of what I get.

回答 (1 件)

Chad Greene
Chad Greene 2016 年 6 月 28 日
The surfm function plots z values as both color and vertical values. Perhaps you're looking for pcolorm, which can be used the same way as surfm, except that it puts all values at zero on the vertical axis.
You'll probably want to plot pcolorm before overlaying land areas. Another option to play with is transparency. For example,
h = pcolorm(lat,long,EIRP(50:90,1:50));
set(h,'facealpha',0.5)
  2 件のコメント
Keihan
Keihan 2016 年 6 月 28 日
Thank you for your response. I still can't see the borders when I use the
h = pcolorm(lat,long,EIRP(50:90,1:50));
command.
Chad Greene
Chad Greene 2016 年 6 月 28 日
And you called pcolorm before overlaying land areas? You can try
uistack(h,'bottom')
after everything to make sure the pcolorm plot is at the bottom of the stack.

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

カテゴリ

Help Center および File ExchangeData Exploration についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by