필터 지우기
필터 지우기

world or continental Maps on slice

조회 수: 5 (최근 30일)
TTA
TTA 2019년 10월 21일
댓글: TTA 2019년 10월 22일
I have this code which as it supposed to but I need something different.
Is it possible to overlay map for example map of the world or regional map like a continent, in this code?
Please help if it is possible
[X,Y,Z] = meshgrid(-2:.2:2);
V = X.*exp(-X.^2-Y.^2-Z.^2);
xslice = [];
yslice = [];
zslice = [-2,0,2];
slice(X,Y,Z,V,xslice,yslice,zslice)
ax=gca;
ax.Children(1).LineStyle='none';
ax.Children(2).LineStyle='none';
ax.Children(3).LineStyle='none';
view(15,15);
colormap jet
colorbar
  댓글 수: 2
darova
darova 2019년 10월 22일
You want to overlay some of slices with world map?
TTA
TTA 2019년 10월 22일
Yes please

댓글을 달려면 로그인하십시오.

답변 (1개)

darova
darova 2019년 10월 22일
Example
A = imread('ngc6543a.jpg');
[m,n,~] = size(A);
N = 100; % number of points for surface
Z = peaks(N); % create peaks
x = linspace(0,1,N);
image(A)
hold on
Zscaled = (Z-min(Z(:)))/(max(Z(:))-min(Z(:)))*255;
p = pcolor(x*n,x*m,Zscaled);
hold off
set(p,'FaceAlpha',0.3)
set(p,'EdgeColor','none')
saveas(gca,'test.png')
  댓글 수: 1
TTA
TTA 2019년 10월 22일
Thanks for your answer but what I want is to overlay maps on each of the slice as it is

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Surface and Mesh Plots에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by