Columnlegend not working when plotting with errorbar
古いコメントを表示
Hi,
I am trying to plot multiple lines with the function errorbar (it works). Then I want to use multicolumn for the legend, but this does not work. It works if I use plot instead of errorbar though.
Could you please help me? I need to separate my legend in more than 1 column since there are several data lines.
Thanks in advance!
6 件のコメント
It works for me (see below). What is the error you're getting and could you provide the code that produces the error? Are you using the 'NumColumns" parameter in the call to legend? What's multicolumn?
x = 0:.2:pi;
y = sin(x);
err = ones(size(x))*.2;
figure;
eh = errorbar(x,y,err);
hold on
eh2 = errorbar(x,y./2,err);
legend({'ex1','ex2'}, 'NumColumns',2)

Adam Danz
2018 年 7 月 12 日
I see. What's not working with your code? Are you getting an error (if so, please share it)? Is your legend empty? Could you share a snippet of code?
Auryn_
2018 年 7 月 12 日
Auryn_
2018 年 7 月 13 日
回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で Errorbars についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!