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 で Contour Plots についてさらに検索
製品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!