Azzera filtri
Azzera filtri

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

7 visualizzazioni (ultimi 30 giorni)
NS
NS il 2 Lug 2018
Modificato: NS il 2 Lug 2018
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

Risposte (0)

Community Treasure Hunt

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

Start Hunting!

Translated by