필터 지우기
필터 지우기

How can I plot parts of an image on a pcolor surface

조회 수: 2 (최근 30일)
loghman
loghman 2016년 11월 6일
편집: loghman 2016년 11월 9일
I have a pcolor surface and also I have an image which I want to empty the black section of the image and put the reminding image on the pcolor so that the pcolor can be shown under the black section of the image and the reminding parts of the image, covers the pcolor.
my pcolor:
my image:
  댓글 수: 2
KSSV
KSSV 2016년 11월 6일
What data you have? It can be done.
loghman
loghman 2016년 11월 6일
I have a X,Y,Z data that I use them to plot surface(with surf or pcolor) and the image.
my code:
[x,y] = meshgrid(1:1000,1:1000);
z = x^3-sqrt(y);
I = imread('mymap.png');
imshow(I, 'InitialMag', 'fit')
hold on
k = pcolor(x,y,z);
shading interp
colormap jet
but after plotting, the surface covers entire image hold off

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

답변 (1개)

Image Analyst
Image Analyst 2016년 11월 6일
Set the alpha channel. Here is how to do it:
Steve Eddins's blog:
  댓글 수: 9
Image Analyst
Image Analyst 2016년 11월 8일
Can you provide an image where the region inside the country is black? Come on, make it easy for us to help you, not hard.
loghman
loghman 2016년 11월 9일
편집: loghman 2016년 11월 9일
The link of the image that you want:
https://s16.postimg.org/wnsw1mtj9/mymap.jpg

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

Community Treasure Hunt

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

Start Hunting!

Translated by