Placing image above contour lines
Mostrar comentarios más antiguos
I'm having trouble plotting an image and 'contour' lines together. The contour lines are not related to the image. I'm mapping the pressure field of a jet engine and using pcolor and contour to show the pressure map and the image is that of an F-22.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
figure('Name','105 Hz Field');
pcolor(zt,xt,FieldDBS')
shading interp
hold on
%JET IMAGE
sf = 0.3048;
[F22,~,alpha]=imread('F22_transparent.png');
image([-54 8]*sf,[20 -24]*sf,F22,'alphadata',alpha);
contour(zt,xt,FieldDBS','k');
plot(z0,x0,'marker','o','markersize',6)
title('Engine Condition: AB Narrowband: 105Hz');
xlabel('Z Position');
ylabel('X Position');
colorbar
colormap('Jet')
caxis([70 140])
hold off
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
When I plot them in this order (pcolor, image, contour) the contour obviously plots over the image. However, when I plot them in the order (pcolor, contour, image), I can't get the image to even appear.
I've tried working with imshow and uistack but I haven't got it to work. Any advice ?
Respuestas (1)
Sean de Wolski
el 13 de Jul. de 2011
my: FEX: meshCanopy function looks like it does what you want but with a mesh instead of a contour. Change the caller function ( mesh) to contour.
Use
view(2)
to view like an image typically.
3 comentarios
Blaine
el 13 de Jul. de 2011
Sean de Wolski
el 13 de Jul. de 2011
Like a 3D RGB image or a 3D volume?
Blaine
el 13 de Jul. de 2011
Categorías
Más información sobre Contour Plots en Centro de ayuda y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!