フィルターのクリア

Shade between lines in log-y scale not properly plot

2 ビュー (過去 30 日間)
Albert Johan Mamani Larico
Albert Johan Mamani Larico 2022 年 5 月 24 日
回答済み: Chunru 2022 年 5 月 24 日
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')

採用された回答

Chunru
Chunru 2022 年 5 月 24 日
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 件)

カテゴリ

Help Center および File ExchangeMATLAB Mobile Fundamentals についてさらに検索

製品


リリース

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by