How to plot into a PNG image?
    조회 수: 4 (최근 30일)
  
       이전 댓글 표시
    
I have a script that plots a 3x3 grid of values as a colormap:
Data = [1:1:9; 1 2 3 4 5 6 7 8 9; 1 2 3 4 5 6 7 8 9 ;1 2 3 4 5 6 7 8 9;1 2 3 4 5 6 7 8 9];
M = zeros(3,3);
 for ii = 2:size(Data,1)
      plot(ii-1)
      M(1:end) = Data(ii,:);
      imagesc(M)
      colormap jet
      shading flat %for an exact result
      % shading interp %for a smooth result 
figure
  end
These values/color intensities represent time spent in a given area. I have a picture of that area (which does not match the shape of the plot it is kinda oblong looking) saved as a png that I want to plot this grid into and fill the gray scale image with the colors instead of getting grid. Is this possible? I have tried to follow this blog post: http://blogs.mathworks.com/steve/2009/02/18/image-overlay-using-transparency/ but it is leading me nowhere. I do have the image processing toolbox if that helps. Thank you
댓글 수: 0
답변 (0개)
참고 항목
카테고리
				Help Center 및 File Exchange에서 Color and Styling에 대해 자세히 알아보기
			
	Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!