filling between two curve by patch
Mostra commenti meno recenti
Hi every one,
I'm trying to use the patch function to fill the gap between two curves with differing X values. However, it seems the function connects first and last values (please see attached image) . also, it doesn't change the color of each curve (to green and black indicated in the code ) when using patch function. could you please to help me with solving this ? (I'm using Matlab 2020b)
Thanks in advance
figure; hold on;
plot(X1,Y, 'g');
plot(X2,Y, 'K');
patch([X1; X2], [Y ;Y], 'B');
axis ij
hold off
Risposta accettata
Più risposte (0)
Categorie
Scopri di più su Polygons in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!