How can I draw the contour/rectangle on the plot?

7 次查看(过去 30 天)
Hi,
I have grid files a and b both have 23*15 size. I wanna plot b over a to show the boundary of the b data. I wrote below code for this but the contour based on b data show over a is not seems correct. Can anyone please help me to solve this issue?
b(b < 0.417) = 0;
b(b > 1.832) = 0;
figure ('Name', 'b plot over a')
pcolor(a);
axis tight;
cptcmap('test.cpt','mapping','scaled');
shading interp;
colorbar('eastoutside');
caxis ([0 6]);
hold on
contour(b,[0.417 1.832],'LineStyle','--','LineWidth',1.5,'LineColor','k');
view(0,90);
I attached the mat file and the figure with this post.Note that I use above command for the attached figure.
Thanks

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Annotations 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by