Add geographic data to pcolor plot

9 次查看(过去 30 天)
Can anyone advise me as to how I can add geographic information to a pcolor plot?
Each of the variables I have is a 12500x800 matrix (these variables are too large to attach here).
I have plotted using the following code:
h=pcolor(new_lon,new_lat,new_maxdata);
set(h,'EdgeColor','none');
colorbar
caxis([0 100])
hold on;
xlabel('Longitude')
ylabel('Latitude')
set(gca,'tickdir','out','layer','top','fontname',...
'arial','fontsize',12);
I'd like to add land for the region, just to at least show where the land begins, not necessarily super detailed. I considered geoscatter() but it doesn't work with matrices. Are there any other options? Maybe I have to add a separate plot on top with land data?

采纳的回答

KSSV
KSSV 2022-3-31
hold on
load coast.mat
plot(long,lat,'k')
  3 个评论
KSSV
KSSV 2022-3-31
From the below link, try downloading your required domain shape file and plot the data.
Louise Wilson
Louise Wilson 2022-3-31
Thanks. I actually have a shapefile I could use already! Got it working now :-)

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Geographic Plots 的更多信息

产品


版本

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by