How to plot pcolor over an image / map ?
3 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Hello,
I am currently working on a matlab app that computes and plots the heatflux generated by a fire.
The heatflux distribution by distance is displayed with a pseudocolor plot (illustration below). I would like to superimpose this plot over a map (image) to illustrate the spacial distribution.
I came across many threads on this forum but I couldn't find a workaround on how to place pcolor image precisely on the map image.
Here is the heatmap generated by pcolor

Below is an illustration of the expected result.

This is the code I ve been testing :
f = figure;
load('ddd.mat') ;
I = imread('map.png');
imshow(I)
hold on
b = pcolor(X,Y,heat_flux_batch2D) ;
% X & Y => 2D MESH / coordinates
% heat_flux_batch2D : contains heat flux values
b.FaceColor = 'interp';
b.FaceAlpha = 0.35 ;
colormap(f,jet(64));
shading interp;
caxis([-1 max(heat_flux_batch2D(:))]);
hold off
The problem is :
- I don't know how to position the pcolor in a specific region of the map / image below it
- I also need to resize the pcolor because it has a different scale than the map. ( it's a screenshot from google map so I could retrieve the actual scale that is 1px <=> 4..6 m ).
So basically, I need to resize the pcolor image and place it on specific location over the map (depending on where the fire was triggered)

Thank you in advance for your help
2 comentarios
Mark Hayworth
el 2 de Sept. de 2019
How did you get the units? Was the pseudocolored image generated from the RGB image so that both are registered (aligned)? Do both the mat file and the image have the same units? Like pixels or something else?
Respuestas (0)
Ver también
Categorías
Más información sobre Lighting, Transparency, and Shading en Help Center y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!