Shade between lines in log-y scale not properly plot
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Albert Johan Mamani Larico
le 24 Mai 2022
Réponse apportée : Chunru
le 24 Mai 2022
Hi, I have a similar issue, my filled area (figure 2) is not as expected, I don´t understand what's wrong. How could I fix it?
load data_ecdf
figure(1) % just to view the expected filled area
semilogy(eOut.psSST, eOut.sSST);grid on;ylabel('mg/L');hold on;title('SST')
semilogy(eOut1.psSST, eOut1.sSST);hold on
semilogy(eOut2.psSST, eOut2.sSST);
legend('empirical','down','up'); hold off
idx = eOut1.sSST>0 & eOut2.sSST>0; % Eliminate Negative & Zero Data
figure(2) % uncertainty band
fill([eOut1.psSST(idx) fliplr(eOut1.psSST(idx))], [eOut1.sSST(idx) fliplr(eOut2.sSST(idx))],[.9 .9 .9], 'linestyle','none')
line(eOut.psSST, eOut.sSST);grid on;ylabel('mg/L');xlabel('probability');title('SST')
set(gca,'YScale','log')
0 commentaires
Réponse acceptée
Chunru
le 24 Mai 2022
load data_ecdf
figure(1) % just to view the expected filled area
semilogy(eOut.psSST, eOut.sSST);grid on;ylabel('mg/L');hold on;title('SST')
semilogy(eOut1.psSST, eOut1.sSST);hold on
semilogy(eOut2.psSST, eOut2.sSST);
legend('empirical','down','up'); hold off
idx1 = eOut1.sSST>0 ;
idx2 = eOut2.sSST>0; % Eliminate Negative & Zero Data
figure(2) % uncertainty band
semilogy(eOut.psSST, eOut.sSST); hold on
%eOut1.psSST(idx)
fill([eOut1.psSST(idx1); flip(eOut2.psSST(idx2))], [eOut1.sSST(idx1); flip(eOut2.sSST(idx2))],[.9 .9 .9], 'linestyle','none')
grid on;ylabel('mg/L');xlabel('probability');title('SST')
set(gca,'YScale','log')
0 commentaires
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur MATLAB Mobile Fundamentals dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!