Borrar filtros
Borrar filtros

How to plot into a PNG image?

4 visualizaciones (últimos 30 días)
matlabuser12
matlabuser12 el 5 de Jul. de 2016
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

Respuestas (0)

Categorías

Más información sobre Blue en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by