How can I draw the contour/rectangle on the plot?
2 views (last 30 days)
Show older comments
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 Comments
Answers (0)
See Also
Categories
Find more on Annotations in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!