How do I get the legend to ignore certain entries when plotting using the shadedErrorBar function?

4 ビュー (過去 30 日間)
I am plotting using shadedErrorBar function and I'd like to have the legend completely ignore the first three entries which represent the shaded error bar and its bounds, and keep just the one solid black line with the 'Float dpCO2' data. Here's the code i'm using:
figure('Position', [100, 100, 600, 400]);
S=F9099Surface;
ice=F9099.Depthm(F9099Surface)>10;
hold on;
error=0.025; %%2.5% TOTAL UNCERTAINTY
errors=F9099.pCO2pHAlgALKALI(S)*error;
shadedErrorBar(F9099.datenum(S),F9099.pCO2pHAlgALKALI(S)-F9099.pCO2a(S),errors)%,'LineWidth',3);
%plot(F9099.datenum(S),F9099.AlgPCO2(S),'r','LineWidth',2);
%plot(F9099.datenum(S),F9099.T09pCO22015(S)-400,'m:','LineWidth',3);
plot(F9099.datenum(S),F9099.Taka2014dpCO2(S),'b:','LineWidth',3);
plot(F9099.datenum(S),F9099.Lands2014dpco2(S),'g:','LineWidth',3);
plot(F9099.datenum(S),zeros(size(F9099.datenum(S))),'color','b','LineWidth',2);
scatter(F9099.datenum(S(ice)),zeros(size(S(ice))),50,'*','k')
hold off;
legend '' '' '' 'Float dpCO_2' 'Takahashi 2014' 'Landschutzer 2014' 'pCO_2_a' 'Float sensed ice'...
'location' 'South'
ylabel '\DeltapCO_2 (\muatm)';
%ylim ([340 480]);
xlim ([min(F9099.datenum) max(F9099.datenum)])
datetick ('x', 'mmm','keeplimits');
print -dpng F9099dpCO2shadederrorclim;
crop ('F9099dpCO2shadederrorclim.png');

採用された回答

Jonathan Kwang
Jonathan Kwang 2016 年 8 月 12 日
The "shadedErrorBar" function is a File Exchange submission and not a builtin MATLAB function. It is usually best to contact the author(s) of the submission to resolve any issues you may have.
  2 件のコメント
Nancy Williams
Nancy Williams 2016 年 8 月 12 日
Ok, helpful advice. Thank you!
Seble Zewdie
Seble Zewdie 2019 年 3 月 26 日
Hi Nancy,
How did you manage to solve this issue of legend when using shaddedErrorBar?

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeLegend についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by