Plot data (3d) only inside polygon
显示 更早的评论
I am trying to plot data (45*56*6) only inside polygon and i tried these steps
imported shapefile and run query to sperate data point inside and outside polygon as
for i=1:6;
isin = inpolygon(X,Y,S.X,S.Y);
test(:,:,i(~isin)) = NaN;
end;
and plot
for i =1:6
subplot(3,2,i);
imagesc(D_masked(:,:,i));
set(a,'AlphaData',~isnan(a))
end
but it did not work for me as
imagesc(xyz,'AlphaData',~isnan(xyz))
xyz here is equal to 45*56 2d data.
Any kind of help is appreciatable.
2 个评论
KSSV
2019-3-26
It can be done...what problem you are facing? Don't use imagesc. Use pcolor.
Shakir Hussain
2019-3-26
编辑:Shakir Hussain
2019-3-26
回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Map Display 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!