Placing image above contour lines
이전 댓글 표시
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 ?
답변 (1개)
Sean de Wolski
2011년 7월 13일
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
Blaine
2011년 7월 13일
Sean de Wolski
2011년 7월 13일
Like a 3D RGB image or a 3D volume?
Blaine
2011년 7월 13일
카테고리
도움말 센터 및 File Exchange에서 Lighting, Transparency, and Shading에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!